load BIC/tape from debugger

This commit is contained in:
folkert van heusden 2024-04-07 23:39:21 +02:00
parent 608d374138
commit 6858904281
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1
2 changed files with 16 additions and 1 deletions

View file

@ -7,6 +7,7 @@
#include "console.h" #include "console.h"
#include "cpu.h" #include "cpu.h"
#include "gen.h" #include "gen.h"
#include "loaders.h"
#include "log.h" #include "log.h"
#include "tty.h" #include "tty.h"
#include "utils.h" #include "utils.h"
@ -474,6 +475,19 @@ void debugger(console *const cnsl, bus *const b, std::atomic_uint32_t *const sto
continue; continue;
} }
else if (parts.at(0) == "tape") {
if (parts.size() == 2) {
auto addr = loadTape(b, parts.at(1));
if (addr.has_value())
c->setPC(addr.value());
}
else {
cnsl->put_string_lf("filename parameter missing");
}
continue;
}
else if (parts[0] == "trl") { else if (parts[0] == "trl") {
if (parts.size() == 1) if (parts.size() == 1)
t_rl.reset(); t_rl.reset();
@ -523,6 +537,7 @@ void debugger(console *const cnsl, bus *const b, std::atomic_uint32_t *const sto
cnsl->put_string_lf("toggle - set switch (s=, 0...15 (decimal)) of the front panel to state (t=, 0 or 1)"); cnsl->put_string_lf("toggle - set switch (s=, 0...15 (decimal)) of the front panel to state (t=, 0 or 1)");
cnsl->put_string_lf("cls - clear screen"); cnsl->put_string_lf("cls - clear screen");
cnsl->put_string_lf("stats - show run statistics"); cnsl->put_string_lf("stats - show run statistics");
cnsl->put_string_lf("tape - load a tape/BIC file, parameter is filename");
#if defined(ESP32) #if defined(ESP32)
cnsl->put_string_lf("cfgnet - configure network (e.g. WiFi)"); cnsl->put_string_lf("cfgnet - configure network (e.g. WiFi)");
cnsl->put_string_lf("startnet - start network"); cnsl->put_string_lf("startnet - start network");

View file

@ -1,4 +1,4 @@
// (C) 2018-2023 by Folkert van Heusden // (C) 2018-2024 by Folkert van Heusden
// Released under MIT license // Released under MIT license
#include <stdint.h> #include <stdint.h>