forked from ayvacs/gba.js.org
-
Notifications
You must be signed in to change notification settings - Fork 1
/
player.html
executable file
·214 lines (199 loc) · 10 KB
/
player.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
<!--
GBA ONLINE; GBA.JS.ORG; "Online GameBoy Advance Emulator"
Copyright (C) 2021-present AYVACS
Licensed under the MIT License (view LICENSE.md for more information)
-->
<!DOCTYPE html>
<html>
<head>
<title>GBA Online</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=160">
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<link href="assets/macos-11x/Icon-MacOS-512x512@2x.png" type="image/png" rel="shortcut icon">
<link href="assets/macos-11x/apple-touch-icon.png" type="image/png" rel="apple-touch-icon">
<link rel="stylesheet" href="stylesheets/main.css">
<link rel="stylesheet" href="stylesheets/player-override.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Merriweather+Sans&display=swap">
<script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
</head>
<body>
<div id="container">
<div id="menu" class="paused">
<ul class="menu" id="menu_top">
<li><a href="../"><img id="logo-small" src="assets/logo-small.png"></img></a></li>
<li>File
<ul>
<li><span>BIOS: </span> <input type="file" id="bios_load" class="files"></li>
<li><span>Game: </span> <input type="file" id="rom_load" class="files"></li>
</ul>
</li>
<li id="play" class="show">Play</li>
<li id="pause" class="hide">Pause</li>
<li id="restart">Restart</li>
<li>Settings
<ul>
<li><input type="checkbox" id="skip_boot"> Skip Boot Intro</li>
<li><input type="checkbox" id="toggleSmoothScaling" checked="checked"> Smooth Scaling</li>
<li><input type="checkbox" id="toggleDynamicSpeed"> Dynamic Speed</li>
<li><input type="checkbox" id="offthread-cpu" checked="checked"> CPU off-thread</li>
<li><input type="checkbox" id="offthread-gpu" checked="checked"> GPU off-thread</li>
<li><input type="checkbox" id="sound"> Sound</li>
<li>GBA Bindings
<ul>
<li id="key_a"><span>A</span></li>
<li id="key_b"><span>B</span></li>
<li id="key_l"><span>L</span></li>
<li id="key_r"><span>R</span></li>
<li id="key_start"><span>Start</span></li>
<li id="key_select"><span>Select</span></li>
<li id="key_up"><span>↑</span></li>
<li id="key_down"><span>↓</span></li>
<li id="key_left"><span>←</span></li>
<li id="key_right"><span>→</span></li>
</ul>
</li>
<li>Emulator Bindings
<ul>
<li id="key_volumeup"><span>Volume Up</span>
</li>
<li id="key_volumedown"><span>Volume Down</span>
</li>
<li id="key_speedup"><span>Speed Up</span></li>
<li id="key_slowdown"><span>Slow Down</span></li>
<li id="key_speedreset"><span>Speed Reset</span></li>
<li id="key_fullscreen"><span>Fullscreen</span></li>
<li id="key_playpause"><span>Play/Pause</span></li>
<li id="key_restart"><span>Restart</span></li>
</ul>
</li>
</ul>
</li>
<li>
Volume
<ul>
<li>
<input type="range" id="volume">
</li>
</ul>
</li>
<li id="saves_menu">
Saves
<ul id="saves_menu_container">
<li><span>Import:</span><input type="file" id="import" class="files"></li>
<li id="existing_saves">
<span>Existing Saves</span>
<ul id="existing_saves_list">
</ul>
</li>
<li><a href="./" id="export" target="_new">Export All Saves</a></li>
</ul>
</li>
<li id="fullscreen">Fullscreen</li>
<li>
<span id="speed">Speed</span>
<ul>
<li>
<input type="range" id="speedset">
</li>
</ul>
</li>
</ul>
</div>
<div id="main">
<canvas class="canvas" id="emulator_target" width="240" height="160"></canvas>
</div>
<div class="touch-controls">
<div class="touch-dpad">
<button id="touch-up">↑</button><br>
<button id="touch-left">←</button>
<button id="touch-right">→</button><br>
<button id="touch-down">↓</button>
</div>
<div class="touch-buttons">
<button id="touch-select">SELECT</button>
<button id="touch-start">START</button>
</div>
<div class="touch-buttons">
<button id="touch-a">A</button>
<button id="touch-b">B</button><br>
<button id="touch-l">L</button>
<button id="touch-r">R</button>
</div>
</div>
<span class="message" id="tempMessage"></span>
</div>
<!-- Required Scripts -->
<!-- Iodine Emu -->
<script src="iodineGBA/includes/TypedArrayShim.js"></script>
<script src="iodineGBA/core/Cartridge.js"></script>
<script src="iodineGBA/core/DMA.js"></script>
<script src="iodineGBA/core/Emulator.js"></script>
<script src="iodineGBA/core/Graphics.js"></script>
<script src="iodineGBA/core/RunLoop.js"></script>
<script src="iodineGBA/core/Memory.js"></script>
<script src="iodineGBA/core/IRQ.js"></script>
<script src="iodineGBA/core/JoyPad.js"></script>
<script src="iodineGBA/core/Serial.js"></script>
<script src="iodineGBA/core/Sound.js"></script>
<script src="iodineGBA/core/Timer.js"></script>
<script src="iodineGBA/core/Wait.js"></script>
<script src="iodineGBA/core/CPU.js"></script>
<script src="iodineGBA/core/Saves.js"></script>
<script src="iodineGBA/core/sound/FIFO.js"></script>
<script src="iodineGBA/core/sound/Channel1.js"></script>
<script src="iodineGBA/core/sound/Channel2.js"></script>
<script src="iodineGBA/core/sound/Channel3.js"></script>
<script src="iodineGBA/core/sound/Channel4.js"></script>
<script src="iodineGBA/core/CPU/ARM.js"></script>
<script src="iodineGBA/core/CPU/THUMB.js"></script>
<script src="iodineGBA/core/CPU/CPSR.js"></script>
<script src="iodineGBA/core/graphics/Renderer.js"></script>
<script src="iodineGBA/core/graphics/RendererShim.js"></script>
<script src="iodineGBA/core/graphics/RendererProxy.js"></script>
<script src="iodineGBA/core/graphics/BGTEXT.js"></script>
<script src="iodineGBA/core/graphics/BG2FrameBuffer.js"></script>
<script src="iodineGBA/core/graphics/BGMatrix.js"></script>
<script src="iodineGBA/core/graphics/AffineBG.js"></script>
<script src="iodineGBA/core/graphics/ColorEffects.js"></script>
<script src="iodineGBA/core/graphics/Mosaic.js"></script>
<script src="iodineGBA/core/graphics/OBJ.js"></script>
<script src="iodineGBA/core/graphics/OBJWindow.js"></script>
<script src="iodineGBA/core/graphics/Window.js"></script>
<script src="iodineGBA/core/graphics/Compositor.js"></script>
<script src="iodineGBA/core/memory/DMA0.js"></script>
<script src="iodineGBA/core/memory/DMA1.js"></script>
<script src="iodineGBA/core/memory/DMA2.js"></script>
<script src="iodineGBA/core/memory/DMA3.js"></script>
<script src="iodineGBA/core/cartridge/SaveDeterminer.js"></script>
<script src="iodineGBA/core/cartridge/SRAM.js"></script>
<script src="iodineGBA/core/cartridge/FLASH.js"></script>
<script src="iodineGBA/core/cartridge/EEPROM.js"></script>
<script src="iodineGBA/core/cartridge/GPIO.js"></script>
<!-- user scripts -->
<script src="modules/AudioGlueCode.js"></script>
<script src="modules/base64.js"></script>
<script src="modules/GfxGlueCode.js"></script>
<script src="modules/GUIGlueCode.js"></script>
<script src="modules/JoyPadGlueCode.js"></script>
<script src="modules/ROMLoadGlueCode.js"></script>
<script src="modules/SavesGlueCode.js"></script>
<script src="modules/WorkerGfxGlueCode.js"></script>
<script src="modules/WorkerGlueCode.js"></script>
<script src="modules/XAudioJS/swfobject.js"></script>
<script src="modules/XAudioJS/resampler.js"></script>
<script src="modules/XAudioJS/XAudioServer.js"></script>
<script src="modules/CoreGlueCode.js"></script>
<!-- show a warning when leaving the page -->
<script>
window.addEventListener('beforeunload', function(e) {
// Cancel the event
e.preventDefault(); // If you prevent default behavior in Mozilla Firefox prompt will always be shown
// Chrome requires returnValue to be set
e.returnValue = '';
});
</script>
</body>
</html>