Skip to content

Commit 4b3e390

Browse files
committed
v8.3.4: updated emulators to latest
1 parent e007386 commit 4b3e390

File tree

8 files changed

+25
-7
lines changed

8 files changed

+25
-7
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-dos",
3-
"version": "8.3.3",
3+
"version": "8.3.4",
44
"description": "Full-featured DOS player with multiple emulator backends",
55
"type": "module",
66
"keywords": [
@@ -37,7 +37,7 @@
3737
"@typescript-eslint/parser": "^6.20.0",
3838
"autoprefixer": "^10.4.17",
3939
"daisyui": "^3.9.3",
40-
"emulators": "8.3.0",
40+
"emulators": "8.3.1",
4141
"eslint": "^8.56.0",
4242
"eslint-config-google": "^0.14.0",
4343
"postcss": "^8.4.33",

src/frame/stats-frame.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ export function StatsFrame() {
9898
<td>HDD Cache Hit/Miss</td>
9999
<td>{stats.driveCacheHit} / {stats.driveCacheMiss}</td>
100100
</tr>
101+
<tr>
102+
<td>HDD Buffered</td>
103+
<td>{stats.driveBufferedAmount}</td>
104+
</tr>
101105
<tr>
102106
<td>HDD RX</td>
103107
<td>{stats.driveIo.map((io) => {

src/sidebar/sidebar-button.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ export function HddLed(props: {}) {
9292
const id = setInterval(() => {
9393
if (state.delayLedTo <= Date.now()) {
9494
const newRecv = getState(store).dos.stats.driveRecv;
95+
const write = getState(store).dos.stats.driveBufferedAmount;
9596
const newEnabled = state.recv !== newRecv;
97+
9698
if (newEnabled !== state.enabled) {
9799
el.classList.remove("bg-base-300", "bg-green-300", "animate-led");
98100
if (newEnabled) {
@@ -103,6 +105,14 @@ export function HddLed(props: {}) {
103105
state.enabled = newEnabled;
104106
}
105107

108+
if (write) {
109+
if (!el.classList.contains("bg-red-300")) {
110+
el.classList.add("bg-red-300");
111+
}
112+
} else {
113+
el.classList.remove("bg-red-300");
114+
}
115+
106116
if (newEnabled) {
107117
state.delayLedTo = Date.now() + 300 + Math.random() * 1500;
108118
} else {

src/sockdrive

src/store/dos.ts

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export interface EmulatorStats {
4242
driveCacheHit: number,
4343
driveCacheMiss: number,
4444
driveCacheUsed: number,
45+
driveBufferedAmount: number,
4546
driveIo: { read: number, write: number }[];
4647
};
4748

@@ -121,6 +122,7 @@ const initialState: {
121122
driveCacheHit: 0,
122123
driveCacheMiss: 0,
123124
driveCacheUsed: 0,
125+
driveBufferedAmount: 0,
124126
driveIo: [],
125127
},
126128
network: {

src/window/dos/dos-runtime.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ function useStats(ci: CommandInterface): void {
195195
driveCacheHit: stats.driveCacheHit,
196196
driveCacheMiss: stats.driveCacheMiss,
197197
driveCacheUsed: stats.driveCacheUsed,
198+
driveBufferedAmount: stats.driveBufferedAmount,
198199
driveIo: structuredClone(stats.driveIo),
199200
};
200201
dispatch(dosSlice.actions.stats(dStats));

src/ws/ws-transport-layer.ts

+1
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ export class WsTransportLayer implements TransportLayer {
213213
driveCacheMiss: this.sockdrive.stats.cacheMiss,
214214
driveRecvTime: this.sockdrive.stats.readTotalTime,
215215
driveCacheUsed: this.sockdrive.stats.cacheUsed,
216+
driveBufferedAmount: 0,
216217
driveIo: this.sockdrive.stats.io,
217218
};
218219
if (payload[0]!.length > 20) {

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1159,10 +1159,10 @@ electron-to-chromium@^1.4.648:
11591159
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.653.tgz#832ab25e80ad698ac09c1ca547bd9ee6cce7df10"
11601160
integrity sha512-wA2A2LQCqnEwQAvwADQq3KpMpNwgAUBnRmrFgRzHnPhbQUFArTR32Ab46f4p0MovDLcg4uqd4nCsN2hTltslpA==
11611161

1162-
1163-
version "8.3.0"
1164-
resolved "https://registry.yarnpkg.com/emulators/-/emulators-8.3.0.tgz#73fef07121ac6b92825653007f59b05ae6a073a6"
1165-
integrity sha512-+m7zXnTxR364sSkt6FPYBJLV2f41F8b5DUhD2/J1w4rGfKSzwmVhRmZldAVH+4c6guqOVFMEFqup8qKE/3gFBA==
1162+
1163+
version "8.3.1"
1164+
resolved "https://registry.yarnpkg.com/emulators/-/emulators-8.3.1.tgz#25788315876b4176bb9aa0ad929707a59f7f3537"
1165+
integrity sha512-rhEVIGKPSINIdCp68Y4Udwofu+nBbfT2eSJNJ/xQiI6wdoV1aIziyROkk6WySM0p5YZ3pu256YuqE3mMNuzMJQ==
11661166

11671167
entities@^4.2.0:
11681168
version "4.5.0"

0 commit comments

Comments
 (0)