-
Notifications
You must be signed in to change notification settings - Fork 179
Expand file tree
/
Copy pathindex.html
More file actions
236 lines (219 loc) · 7.67 KB
/
Copy pathindex.html
File metadata and controls
236 lines (219 loc) · 7.67 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>js-dos 8.xx</title>
<style>
html,
body {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.tsx">
</script>
<script>
if (window.android !== undefined && window.android.startHardwareService !== undefined) {
window.backendHardware = (emulator) => {
return new Promise((resolve) => {
window.backendResolve = resolve;
window.android.startHardwareService(emulator);
});
};
}
const params = new URLSearchParams(location.search);
const startIpxServer = params.get("startIpxServer") === "1";
const connectIpxAddress = params.get("connectIpxAddress") === "1" ? "js-dos-dev-room" : undefined;
document.addEventListener("DOMContentLoaded", () => {
/* eslint-disable max-len */
/* eslint-enable max-len */
const props = Dos(document.getElementById("app"),
{
offscreenCanvas: true,
// url: "https://br.cdn.dos.zone/published/br.diwvjo.Win95A_DX5.2_auto.jsdos",
// url: "https://br.cdn.dos.zone/published/br.rumawg.U95boat.jsdos",
// url: "https://cdn.dos.zone/custom/dos/QB45.jsdos", // qbasic
// url: decodeURIComponent("https%3A%2F%2Fcdn.dos.zone%2Fcustom%2Fdos%2Fdoom_dm.jsdos"),
// url: decodeURIComponent("https%3A%2F%2Fcdn.dos.zone%2Fcustom%2Fdos%2Fhomm2_netbios.jsdos"),
// url: "https://cdn.dos.zone/original/2X/2/24b00b14f118580763440ecaddcc948f8cb94f14.jsdos", // digger
// url: "https://v8.js-dos.com/bundles/doom.jsdos",
// url: "https://cdn.dos.zone/custom/dos/duke3d_ipx.jsdos",
// url: "https://br.cdn.dos.zone/ipx/duke3d/duke3d_ipx.jsdos",
// url: "https://br.cdn.dos.zone/ipx/doom_dm/doom_dm.jsdos",
// url: "https://v8.js-dos.com/bundles/dhry2.jsdos", // dhry2
// url: "https://cdn.dos.zone/original/2X/7/744842062905f72648a4d492ccc2526d039b3702.jsdos", // sim-city
// url: "https://cdn.dos.zone/custom/dos/war2.jsdos", // warcraft-2
// url: "https://cdn.dos.zone/original/2X/5/5f21f221e023bbca253396824c5f652438eeef8c.jsdos", // поле чудес
// url: "https://cdn.dos.zone/custom/dos/homm_2.jsdos",
// url: "https://br.cdn.dos.zone/js-dos/system/win95-v1.jsdos", // win95-v1
// url: "https://br.cdn.dos.zone/published/br.kxuntr.MDKperfWIN.jsdos", // MDK Performance Test For Windows
// url: "https://br.cdn.dos.zone/published/br.anhfhb.Bench95.jsdos", // Bench95
// url: "https://cdn.dos.zone/custom/dos/blood-lowres.jsdos", // blood
// url: "https://br.cdn.dos.zone/published/br.fuggxt.DisNormal.jsdos",
// url: "https://br.cdn.dos.zone/published/br.pojmnc.SimTowerupd.jsdos",
// url: "https://cdn.dos.zone/custom/dos/gta-mobile.jsdos",
// url: "https://br.cdn.dos.zone/niccarter54/shtirlitz.jsdos",
// url: "https://br.cdn.dos.zone/published/br.hmjhoz.DonKapone.jsdos",
// url: "https://cdn.dos.zone/custom/dos/diablo-109.jsdos",
// url: "https://br.cdn.dos.zone/published/br.aahmua.maxupd.jsdos",
// dosboxConf: `
// [autoexec]
// mount c .
// c:
// `,
// jsdosConf: {
// "layersConfig": {
// "version": 2,
// "layers": [
// {
// "grid": "honeycomb",
// "title": "Layer#0",
// "controls": [
// {
// "row": 0,
// "column": 0,
// "symbol": "↑",
// "type": "Key",
// "mapTo": [
// 265
// ]
// }
// ]
// }
// ]
// }
// },
// initFs: [
// { path: "1.txt", contents: new TextEncoder().encode("123") },
// { path: "D/2.txt", contents: new TextEncoder().encode("345") },
// ],
// dosboxConf: diabloConf,
// autoStart: true,
// countDownStart: 5,
// kiosk: true,
// background: "https://dos.zone/images/http/original/2X/f/f833b147609640191342f555d70eb07261f53c03.png/0a94af564ab81a14a27d6a67671e5416.webp",
pathPrefix: "/emulators/",
// pathPrefix: "https://v8.js-dos.com/latest/emulators/",
// pathPrefix: "https://br.cdn.dos.zone/js-dos/latest/emulators/",
// pathSuffix: ".ea",
// backend: "dosboxX",
// backendHardware: (backend) => {
// console.log("Hardware backend for", backend);
// return Promise.resolve("ws://127.0.0.1:8888");
// },
// backendHardware: window.backendHardware,
// noCursor: true,
// softKeyboardLayout: [
// "q w e r t",
// "{up} {down}",
// "{left} {right}",
// "{symbols}"
// ],
// softKeyboardSymbols: [
// {
// "{up}": "↑",
// "{down}": "↓",
// "{left}": "←",
// "{right}": "→",
// },
// {
// "{up}": "↑",
// "{down}": "↓",
// "{left}": "←",
// "{right}": "→",
// "q": "й", "w": "ц", "e": "у", "r": "к", "t": "е",
// },
// ],
// softKeyboardLayout: [
// [
// [
// "{up}",
// ],
// [
// "{left} {right}",
// ],
// [
// "{down}",
// ]
// ],
// ],
// softFullscreen: true,
softKeyboardLayout: [
[
[
"{layout} {up}",
],
],
[
[
"{layout} {down}",
],
],
],
onEvent: (event, arg) => {
console.log("Event", event, arg);
if (event === "ci-ready") {
const net = arg.net();
console.log("js-dos version:", props.getVersion(), "net:", (net ? net.peerId : "none"));
window.ci = arg;
if (net && startIpxServer) {
net.registerAlias("js-dos-dev-room").catch(console);
}
// props.setFullScreen(true);
}
},
// renderAspect: "1/1",
// renderBackend: "webgl",
// imageRendering: "smooth",
// thinSidebar: true,
startIpxServer,
connectIpxAddress,
fastForwardOnBoot: 5,
});
window.props = props;
});
const diabloConf = `
[sdl]
autolock=false
mouse_emulation=integration
[dosbox]
title=Windows 95
memsize=128
[video]
vmemsize=8
vesa modelist width limit=0
vesa modelist height limit=0
[dos]
ver=7.1
hard drive data rate limit=0
floppy drive data rate limit=0
[cpu]
cputype=pentium_mmx
core=auto
integration device=true
[sblaster]
sbtype=sb16vibra
[fdc, primary]
int13fakev86io=true
[ide, primary]
int13fakeio=true
int13fakev86io=true
[ide, secondary]
int13fakeio=true
int13fakev86io=true
cd-rom insertion delay=4000
[render]
scaler=none
[autoexec]
echo off
imgmount 2 sockdrive wss://sockdrive.js-dos.com:8001 dos.zone diablo_109_c
imgmount 3 sockdrive wss://sockdrive.js-dos.com:8001 dos.zone diablo_109_d
boot c:
`;
</script>
</body>
</html>