From 5516f463bfd3d9ceed9aa40f6e25f78de8d0d70d Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Thu, 7 Aug 2025 17:53:01 +0200 Subject: [PATCH] =?UTF-8?q?-=20[NEW]=20C=C3=A0rrega=20de=20disks=20des=20d?= =?UTF-8?q?el=20debuger=20-=20[FIX]=20Al=20carregar=20un=20nou=20disk=20s'?= =?UTF-8?q?alliberava=20mal=20la=20mem=C3=B2ria?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- z80debug.cpp | 9 +++++++++ zx_disk.cpp | 2 +- zx_mem.cpp | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/z80debug.cpp b/z80debug.cpp index 5576d9f..ab7d6b0 100644 --- a/z80debug.cpp +++ b/z80debug.cpp @@ -7,6 +7,7 @@ #include "zx_ula.h" #include "zx_speaker.h" #include "zx_tape.h" +#include "zx_disk.h" #include "ui.h" #include "ui_window.h" #include "zx_screen.h" @@ -906,6 +907,14 @@ namespace z80debug } else if (strcmp(cmd, "play")==0) { zx_tape::play(); } + } else if (strcmp(cmd, "disk")==0) { + getcmd(); + if (strcmp(cmd, "load")==0) { + getcmd(); + char filename[256]; + strcpy(filename, cmd); + zx_disk::load(filename); + } } else if (strcmp(cmd, "poke")==0) { getcmd(); int address = getnum(cmd); diff --git a/zx_disk.cpp b/zx_disk.cpp index 501b4cd..e766186 100644 --- a/zx_disk.cpp +++ b/zx_disk.cpp @@ -109,7 +109,7 @@ namespace zx_disk if (disk.tracks) { for (int i=0; i #include "z80.h" #include "zx_screen.h"