diff --git a/src/protocol/client.ts b/src/protocol/client.ts index d77409b..6dccd85 100644 --- a/src/protocol/client.ts +++ b/src/protocol/client.ts @@ -693,9 +693,12 @@ export class ViceClient { // Snapshot methods async saveSnapshot(filename: string): Promise { const filenameBuffer = Buffer.from(filename, "utf8"); - const body = Buffer.alloc(1 + filenameBuffer.length); - body[0] = filenameBuffer.length; - filenameBuffer.copy(body, 1); + // VICE Dump expects: saveROMs(1) + saveDisks(1) + filenameLen(1) + filename + const body = Buffer.alloc(3 + filenameBuffer.length); + body[0] = 1; // SR: save ROMs = true + body[1] = 0; // SD: save disks = false + body[2] = filenameBuffer.length; + filenameBuffer.copy(body, 3); await this.sendCommand(Command.Dump, body); }