mirror of
https://github.com/dualshock-tools/dualshock-tools.github.io.git
synced 2026-07-18 05:34:06 +03:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e83c790e5a | ||
|
|
120c1423a1 | ||
|
|
d1cbaeffd8 | ||
|
|
10123705f0 |
115
core.js
115
core.js
@@ -929,11 +929,12 @@ async function wait_until_written(expected) {
|
||||
data = await device.receiveFeatureReport(0x81)
|
||||
|
||||
again = false
|
||||
for(i=0;i<expected.length;i++)
|
||||
for(i=0;i<expected.length;i++) {
|
||||
if(data.getUint8(1+i, true) != expected[i]) {
|
||||
again = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!again) {
|
||||
return true;
|
||||
}
|
||||
@@ -946,6 +947,40 @@ function set_edge_progress(score) {
|
||||
$("#dsedge-progress").css({ "width": score + "%" })
|
||||
}
|
||||
|
||||
async function ds5_edge_unlock_module(i) {
|
||||
m_name = i == 0 ? "left module" : "right module";
|
||||
|
||||
await device.sendFeatureReport(0x80, alloc_req(0x80, [21, 6, i, 11]))
|
||||
await new Promise(r => setTimeout(r, 200));
|
||||
ret = await wait_until_written([21, 6, 2])
|
||||
if(!ret) {
|
||||
throw new Error(l("Cannot unlock") + " " + l(m_name));
|
||||
}
|
||||
}
|
||||
|
||||
async function ds5_edge_lock_module(i) {
|
||||
m_name = i == 0 ? "left module" : "right module";
|
||||
|
||||
await device.sendFeatureReport(0x80, alloc_req(0x80, [21, 4, i, 8]))
|
||||
await new Promise(r => setTimeout(r, 200));
|
||||
ret = await wait_until_written([21, 4, 2])
|
||||
if(!ret) {
|
||||
throw new Error(l("Cannot lock") + " " + l(m_name));
|
||||
}
|
||||
}
|
||||
|
||||
async function ds5_edge_store_data_into(i) {
|
||||
m_name = i == 0 ? "left module" : "right module";
|
||||
|
||||
await device.sendFeatureReport(0x80, alloc_req(0x80, [21, 5, i]))
|
||||
await new Promise(r => setTimeout(r, 200));
|
||||
ret = await wait_until_written([21, 5, 2])
|
||||
if(!ret) {
|
||||
throw new Error(l("Cannot store data into") + " " + l(m_name));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async function ds5_edge_flash_modules() {
|
||||
la("ds5_edge_flash_modules");
|
||||
var modal = null;
|
||||
@@ -959,74 +994,36 @@ async function ds5_edge_flash_modules() {
|
||||
set_edge_progress(0);
|
||||
|
||||
// Reload data, this ensures correctly writing data in the controller
|
||||
await new Promise(r => setTimeout(r, 100));
|
||||
set_edge_progress(10);
|
||||
|
||||
// Unlock modules
|
||||
await ds5_edge_unlock_module(0);
|
||||
set_edge_progress(15);
|
||||
await ds5_edge_unlock_module(1);
|
||||
set_edge_progress(30);
|
||||
|
||||
// Unlock NVS
|
||||
await ds5_nvunlock()
|
||||
await new Promise(r => setTimeout(r, 50));
|
||||
set_edge_progress(5);
|
||||
set_edge_progress(45);
|
||||
|
||||
// This should trigger write into modules
|
||||
data = await ds5_get_inmemory_module_data()
|
||||
await new Promise(r => setTimeout(r, 50));
|
||||
set_edge_progress(10);
|
||||
set_edge_progress(60);
|
||||
await write_finetune_data(data)
|
||||
|
||||
await new Promise(r => setTimeout(r, 100));
|
||||
set_edge_progress(15);
|
||||
|
||||
await device.sendFeatureReport(0x80, alloc_req(0x80, [21, 6, 0]))
|
||||
await new Promise(r => setTimeout(r, 200));
|
||||
ret = await wait_until_written([21, 6, 2])
|
||||
if(!ret) {
|
||||
throw new Error(l("Cannot unlock") + " " + l("left module"));
|
||||
}
|
||||
|
||||
// Extra delay
|
||||
await new Promise(r => setTimeout(r, 100));
|
||||
|
||||
set_edge_progress(30);
|
||||
await device.sendFeatureReport(0x80, alloc_req(0x80, [21, 5, 0]))
|
||||
await new Promise(r => setTimeout(r, 200));
|
||||
ret = await wait_until_written([21, 5, 2])
|
||||
if(!ret) {
|
||||
throw new Error(l("Cannot store data into") + " " + l("left module"));
|
||||
}
|
||||
|
||||
await new Promise(r => setTimeout(r, 100));
|
||||
|
||||
set_edge_progress(45);
|
||||
await device.sendFeatureReport(0x80, alloc_req(0x80, [21, 6, 1]))
|
||||
await new Promise(r => setTimeout(r, 200));
|
||||
ret = await wait_until_written([21, 6, 2])
|
||||
if(!ret) {
|
||||
throw new Error(l("Cannot unlock") + " " + l("right module"));
|
||||
}
|
||||
|
||||
await new Promise(r => setTimeout(r, 100));
|
||||
set_edge_progress(60);
|
||||
await device.sendFeatureReport(0x80, alloc_req(0x80, [21, 5, 1]))
|
||||
await new Promise(r => setTimeout(r, 200));
|
||||
ret = await wait_until_written([21, 5, 2])
|
||||
if(!ret) {
|
||||
throw new Error(l("Cannot store data into") + " " + l("right module"));
|
||||
}
|
||||
|
||||
set_edge_progress(75);
|
||||
|
||||
await device.sendFeatureReport(0x80, alloc_req(0x80, [21, 4, 0, 0]))
|
||||
await new Promise(r => setTimeout(r, 200));
|
||||
ret = await wait_until_written([21, 4, 2])
|
||||
if(!ret) {
|
||||
throw new Error(l("Cannot lock") + " " + l("left module"));
|
||||
}
|
||||
|
||||
set_edge_progress(90);
|
||||
|
||||
await device.sendFeatureReport(0x80, alloc_req(0x80, [21, 4, 1, 0]))
|
||||
await new Promise(r => setTimeout(r, 200));
|
||||
ret = await wait_until_written([21, 4, 2])
|
||||
if(!ret) {
|
||||
throw new Error(l("Cannot lock") + " " + l("right module"));
|
||||
}
|
||||
|
||||
// Lock back modules
|
||||
await ds5_edge_lock_module(0);
|
||||
set_edge_progress(80);
|
||||
await ds5_edge_lock_module(1);
|
||||
set_edge_progress(100);
|
||||
|
||||
// Lock back NVS
|
||||
await new Promise(r => setTimeout(r, 100));
|
||||
await ds5_nvlock()
|
||||
|
||||
@@ -1214,7 +1211,9 @@ async function ds5_get_inmemory_module_data() {
|
||||
} else if(mode == 3) {
|
||||
// DualSense Edge
|
||||
await device.sendFeatureReport(0x80, alloc_req(0x80, [12, 4]))
|
||||
|
||||
}
|
||||
await new Promise(r => setTimeout(r, 100));
|
||||
var data = await device.receiveFeatureReport(0x81)
|
||||
var cmd = data.getUint8(0, true);
|
||||
var p1 = data.getUint8(1, true);
|
||||
|
||||
@@ -830,7 +830,7 @@ dl.row dd { font-family: monospace; }
|
||||
<div class="container">
|
||||
<footer>
|
||||
<div class="d-flex flex-column flex-sm-row justify-content-between py-4 my-4 border-top" id="footbody">
|
||||
<p><a target="_blank" href="https://github.com/dualshock-tools/dualshock-tools.github.io/commits/main/"><span class="ds-i18n">Version</span> 2.5</a> (2025-05-17) - <a href="#" class="ds-i18n" onclick="show_donate_modal();">Support this project</a> <span id="authorMsg"></span></p>
|
||||
<p><a target="_blank" href="https://github.com/dualshock-tools/dualshock-tools.github.io/commits/main/"><span class="ds-i18n">Version</span> 2.6</a> (2025-05-19) - <a href="#" class="ds-i18n" onclick="show_donate_modal();">Support this project</a> <span id="authorMsg"></span></p>
|
||||
|
||||
<ul class="list-unstyled d-flex">
|
||||
<li class="ms-3"><a class="link-body-emphasis" href="mailto:ds4@the.al" target="_blank"><svg class="bi" width="24" height="24"><use xlink:href="#mail"/></svg></a></li>
|
||||
|
||||
@@ -210,17 +210,17 @@
|
||||
"We are not responsible for any damage caused by attempting this modification.": "Não nos responsabilizamos por quaisquer dano causado ao tentar usar esta modificação.",
|
||||
"You can do this in two ways:": "Pode fazer isto de duas formas",
|
||||
"here": "Aqui",
|
||||
"Cannot lock": "",
|
||||
"Cannot store data into": "",
|
||||
"Cannot unlock": "",
|
||||
"Color": "",
|
||||
"Color detection thanks to": "",
|
||||
"FW Series": "",
|
||||
"If the calibration is not stored permanently, please double-check the wirings of the hardware mod.": "",
|
||||
"Left Module Barcode": "",
|
||||
"PCBA ID": "",
|
||||
"Right Module Barcode": "",
|
||||
"left module": "",
|
||||
"right module": "",
|
||||
"Cannot lock": "Não é possível bloquear",
|
||||
"Cannot store data into": "Não é possível armazenar dados em",
|
||||
"Cannot unlock": "Não é possível desbloquear",
|
||||
"Color": "Cor",
|
||||
"Color detection thanks to": "Detecção de cor graças a",
|
||||
"FW Series": "Série do FW",
|
||||
"If the calibration is not stored permanently, please double-check the wirings of the hardware mod.": "Se a calibração não for armazenada permanentemente, verifique novamente os fios soldados na modificação de hardware.",
|
||||
"Left Module Barcode": "Código de barras do módulo esquerdo",
|
||||
"PCBA ID": "ID do PCBA",
|
||||
"Right Module Barcode": "Código de barras do módulo direito",
|
||||
"left module": "módulo esquerdo",
|
||||
"right module": "módulo direito",
|
||||
"": ""
|
||||
}
|
||||
@@ -214,14 +214,14 @@
|
||||
"You can do this in two ways:": "你可以用两种方式来做",
|
||||
"here": "这里",
|
||||
"If the calibration is not stored permanently, please double-check the wirings of the hardware mod.": "如果校准没有永久生效,请检查硬件模块的接线。",
|
||||
"Cannot lock": "",
|
||||
"Cannot store data into": "",
|
||||
"Cannot unlock": "",
|
||||
"Color": "",
|
||||
"Color detection thanks to": "",
|
||||
"Left Module Barcode": "",
|
||||
"Right Module Barcode": "",
|
||||
"left module": "",
|
||||
"right module": "",
|
||||
"Cannot lock": "无法锁定",
|
||||
"Cannot store data into": "无法将数据存储到",
|
||||
"Cannot unlock": "无法解锁",
|
||||
"Color": "颜色",
|
||||
"Color detection thanks to": "颜色检测由",
|
||||
"Left Module Barcode": "左侧模块条形码",
|
||||
"Right Module Barcode": "右侧模块条形码",
|
||||
"left module": "左侧模块",
|
||||
"right module": "右侧模块",
|
||||
"": ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,21 +207,21 @@
|
||||
"You can do this in two ways:": "您可以透過兩種方式來完成這項操作:",
|
||||
"here": "這裏",
|
||||
"If the calibration is not stored permanently, please double-check the wirings of the hardware mod.": "如果校準沒有永久生效,請檢查硬件模塊的接線。",
|
||||
"Battery Barcode": "",
|
||||
"Bluetooth Address": "",
|
||||
"Cannot lock": "",
|
||||
"Cannot store data into": "",
|
||||
"Cannot unlock": "",
|
||||
"Color": "",
|
||||
"Color detection thanks to": "",
|
||||
"Left Module Barcode": "",
|
||||
"MCU Unique ID": "",
|
||||
"Right Module Barcode": "",
|
||||
"Serial Number": "",
|
||||
"VCM Left Barcode": "",
|
||||
"VCM Right Barcode": "",
|
||||
"Venom FW Version": "",
|
||||
"left module": "",
|
||||
"right module": "",
|
||||
"Battery Barcode": "電池條形碼",
|
||||
"Bluetooth Address": "藍牙地址",
|
||||
"Cannot lock": "無法鎖定",
|
||||
"Cannot store data into": "無法將數據存儲到",
|
||||
"Cannot unlock": "無法解鎖",
|
||||
"Color": "顏色",
|
||||
"Color detection thanks to": "顏色檢測由",
|
||||
"Left Module Barcode": "左側模塊條形碼",
|
||||
"MCU Unique ID": "MCU唯壹ID",
|
||||
"Right Module Barcode": "右側模塊條形碼",
|
||||
"Serial Number": "序列號",
|
||||
"VCM Left Barcode": "VCM左條形碼",
|
||||
"VCM Right Barcode": "VCM右條形碼",
|
||||
"Venom FW Version": "Venom固件版本",
|
||||
"left module": "左側模塊",
|
||||
"right module": "右側模塊",
|
||||
"": ""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user