-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
n64_ctrlpak.html
57 lines (49 loc) · 2.41 KB
/
n64_ctrlpak.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
---
feature_name: BlueRetro N64 controller pak manager
icon_url: icon.png
index: index.html
---
{% include_relative _includes/intro.html %}
<p align="center"><a href="https://blueretro.com/products/brx"><img src="brx_banner.png"/></a></p><br>
Please consult the documentation found on the wiki:<br>
<a href="https://github.com/darthcloud/BlueRetro/wiki/BlueRetro-BLE-Web-Config-User-Manual#71---n64-controller-pak-manager-page" target="_blank">7.1 - N64 controller pak manager page</a><br><br>
<!-- Base on https://www.html5rocks.com/en/tutorials/file/dndfiles// -->
<div id="divBtConn">
<button id="btConn">Connect BlueRetro</button><br>
<small><i>Disconnect all controllers from BlueRetro before connecting for pak management.</i></small>
</div>
<div id="divInfo" style="display:none;margin-bottom:1em;"></div>
<div id="divFileSelect" style="display:none;margin-bottom:1em;">
Select BlueRetro controller pak bank:
<select id="pakSelect">
<option value="0">Pak 1</option>
<option value="1">Pak 2</option>
<option value="2">Pak 3</option>
<option value="3">Pak 4</option>
</select><br><br>
<button id="btnPakRead">Read</button><br><br>
<button id="btnPakFormat">Format</button><br><br>
<button id="btnPakWrite">Write</button>
Select .MPK file to write:
<input type="file" id="pakFile"/><br><br>
Use <a href=https://bryc.github.io/mempak target="_blank">https://bryc.github.io/mempak</a> (by <a href=https://github.com/bryc target="_blank">bryc</a>) to manage content of .MPK files.
</div>
<div id="divFileTransfer" style="display:none;margin-bottom:1em;">
<div id="progress_bar"><div class="percent"></div></div>
<button id="btnFileTransferCancel">Cancel</button>
</div>
{% include output_helper.html %}
<script type="module">
import { btConn, pakRead, pakWrite, pakFormat, abortFileTransfer } from './n64_ctrlpak.js';
document.getElementById("btnPakRead").addEventListener('click', pakRead);
document.getElementById("btnPakWrite").addEventListener('click', pakWrite);
document.getElementById("btnPakFormat").addEventListener('click', pakFormat);
document.getElementById("btnFileTransferCancel").addEventListener('click', abortFileTransfer);
document.getElementById("btConn").addEventListener('click', function() {
if (isWebBluetoothEnabled()) {
ChromeSamples.clearLog();
btConn();
}
});
</script>
{% include_relative _includes/utils.html %}