does not even compile yet
This commit is contained in:
parent
85d7c57453
commit
ce1caff5a8
36 changed files with 144 additions and 3 deletions
1
RP2040/bus.cpp
Symbolic link
1
RP2040/bus.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../bus.cpp
|
1
RP2040/bus.h
Symbolic link
1
RP2040/bus.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../bus.h
|
1
RP2040/console.cpp
Symbolic link
1
RP2040/console.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../console.cpp
|
1
RP2040/console.h
Symbolic link
1
RP2040/console.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../console.h
|
1
RP2040/cpu.cpp
Symbolic link
1
RP2040/cpu.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../cpu.cpp
|
1
RP2040/cpu.h
Symbolic link
1
RP2040/cpu.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../cpu.h
|
1
RP2040/debugger.cpp
Symbolic link
1
RP2040/debugger.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../debugger.cpp
|
1
RP2040/debugger.h
Symbolic link
1
RP2040/debugger.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../debugger.h
|
1
RP2040/disk_backend.cpp
Symbolic link
1
RP2040/disk_backend.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../disk_backend.cpp
|
1
RP2040/disk_backend.h
Symbolic link
1
RP2040/disk_backend.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../disk_backend.h
|
1
RP2040/disk_backend_file.cpp
Symbolic link
1
RP2040/disk_backend_file.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../disk_backend_file.cpp
|
1
RP2040/disk_backend_file.h
Symbolic link
1
RP2040/disk_backend_file.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../disk_backend_file.h
|
1
RP2040/error.cpp
Symbolic link
1
RP2040/error.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../error.cpp
|
1
RP2040/error.h
Symbolic link
1
RP2040/error.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../error.h
|
1
RP2040/gen.h
Symbolic link
1
RP2040/gen.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../gen.h
|
1
RP2040/kw11-l.cpp
Symbolic link
1
RP2040/kw11-l.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../kw11-l.cpp
|
1
RP2040/kw11-l.h
Symbolic link
1
RP2040/kw11-l.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../kw11-l.h
|
1
RP2040/loaders.cpp
Symbolic link
1
RP2040/loaders.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../loaders.cpp
|
1
RP2040/loaders.h
Symbolic link
1
RP2040/loaders.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../loaders.h
|
1
RP2040/log.cpp
Symbolic link
1
RP2040/log.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../log.cpp
|
1
RP2040/log.h
Symbolic link
1
RP2040/log.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../log.h
|
1
RP2040/memory.cpp
Symbolic link
1
RP2040/memory.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../memory.cpp
|
1
RP2040/memory.h
Symbolic link
1
RP2040/memory.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../memory.h
|
17
RP2040/platformio.ini
Normal file
17
RP2040/platformio.ini
Normal file
|
@ -0,0 +1,17 @@
|
|||
[platformio]
|
||||
default_envs = RP2040
|
||||
src_dir = .
|
||||
|
||||
[env:RP2040]
|
||||
lib_ldf_mode = deep+
|
||||
src_filter = +<*> -<.git/> -<.svn/> -<example/> -<examples/> -<test/> -<tests/> -<build> -<player.cpp>
|
||||
platform = raspberrypi
|
||||
board = pico
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
upload_speed = 1000000
|
||||
lib_deps = greiman/SdFat@^2.1.2
|
||||
adafruit/Adafruit NeoPixel@^1.10.4
|
||||
build_flags = -std=gnu++17 -Ofast -DRP2040=1 -ggdb3
|
||||
#-D_GLIBCXX_USE_C99
|
||||
build_unflags = -std=gnu++14 -Os
|
1
RP2040/rk05.cpp
Symbolic link
1
RP2040/rk05.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../rk05.cpp
|
1
RP2040/rk05.h
Symbolic link
1
RP2040/rk05.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../rk05.h
|
1
RP2040/rl02.cpp
Symbolic link
1
RP2040/rl02.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../rl02.cpp
|
1
RP2040/rl02.h
Symbolic link
1
RP2040/rl02.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../rl02.h
|
11
RP2040/rp2040.h
Normal file
11
RP2040/rp2040.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#if defined(RP2040)
|
||||
#include <Arduino.h>
|
||||
|
||||
#include <SPI.h>
|
||||
|
||||
#define USE_SDFAT
|
||||
#define SD_FAT_TYPE 1
|
||||
#include <SdFat.h>
|
||||
#endif
|
1
RP2040/tm-11.cpp
Symbolic link
1
RP2040/tm-11.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../tm-11.cpp
|
1
RP2040/tm-11.h
Symbolic link
1
RP2040/tm-11.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../tm-11.h
|
1
RP2040/tty.cpp
Symbolic link
1
RP2040/tty.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../tty.cpp
|
1
RP2040/tty.h
Symbolic link
1
RP2040/tty.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../tty.h
|
1
RP2040/utils.cpp
Symbolic link
1
RP2040/utils.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../utils.cpp
|
1
RP2040/utils.h
Symbolic link
1
RP2040/utils.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../utils.h
|
86
debugger.cpp
86
debugger.cpp
|
@ -10,8 +10,12 @@
|
|||
#include "utils.h"
|
||||
|
||||
|
||||
#if defined(ESP32) || defined(RP2040)
|
||||
#if defined(ESP32)
|
||||
#include "esp32.h"
|
||||
#else
|
||||
#include "rp2040.h"
|
||||
#endif
|
||||
|
||||
void setBootLoader(bus *const b);
|
||||
|
||||
|
@ -498,9 +502,85 @@ void debugger(console *const cnsl, bus *const b, std::atomic_uint32_t *const sto
|
|||
|
||||
*cnsl->get_running_flag() = false;
|
||||
|
||||
if (!single_step) {
|
||||
auto speed = c->get_mips_rel_speed();
|
||||
cnsl->debug("MIPS: %.2f, relative speed: %.2f%%, instructions executed: %lu", std::get<0>(speed), std::get<1>(speed), std::get<2>(speed));
|
||||
c->reset();
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
#if defined(ESP32) || define(RP2040)
|
||||
else if (cmd == "cfgdisk") {
|
||||
configure_disk(cnsl);
|
||||
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#if defined(ESP32)
|
||||
else if (cmd == "cfgnet") {
|
||||
configure_network(cnsl);
|
||||
|
||||
continue;
|
||||
}
|
||||
else if (cmd == "startnet") {
|
||||
start_network(cnsl);
|
||||
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
else if (cmd == "quit" || cmd == "q") {
|
||||
#if defined(ESP32)
|
||||
ESP.restart();
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
else if (cmd == "help" || cmd == "h" || cmd == "?") {
|
||||
cnsl->put_string_lf("disassemble/d - show current instruction (pc=/n=)");
|
||||
cnsl->put_string_lf("go - run until trap or ^e");
|
||||
#if !defined(ESP32) && !define(RP2040)
|
||||
cnsl->put_string_lf("quit/q - stop emulator");
|
||||
#endif
|
||||
cnsl->put_string_lf("examine/e - show memory address (<b|w> <octal address> [<n>])");
|
||||
cnsl->put_string_lf("reset/r - reset cpu/bus/etc");
|
||||
cnsl->put_string_lf("single/s - run 1 instruction (implicit 'disassemble' command)");
|
||||
cnsl->put_string_lf("sbp/cbp/lbp - set/clear/list breakpoint(s)");
|
||||
cnsl->put_string_lf("trace/t - toggle tracing");
|
||||
cnsl->put_string_lf("strace - start tracing from address - invoke without address to disable");
|
||||
cnsl->put_string_lf("mmudump - dump MMU settings (PARs/PDRs)");
|
||||
cnsl->put_string_lf("setpc - set PC to value");
|
||||
cnsl->put_string_lf("setmem - set memory (a=) to value (v=), both in octal, one byte");
|
||||
cnsl->put_string_lf("toggle - set switch (s=, 0...15 (decimal)) of the front panel to state (t=, 0 or 1)");
|
||||
#if defined(ESP32)
|
||||
cnsl->put_string_lf("cfgnet - configure network (e.g. WiFi)");
|
||||
cnsl->put_string_lf("startnet - start network");
|
||||
#endif
|
||||
#if defined(ESP32) || define(RP2040)
|
||||
cnsl->put_string_lf("cfgdisk - configure disk");
|
||||
#endif
|
||||
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
cnsl->put_string_lf("?");
|
||||
continue;
|
||||
}
|
||||
|
||||
c->emulation_start();
|
||||
|
||||
*cnsl->get_running_flag() = true;
|
||||
|
||||
while(*stop_event == EVENT_NONE) {
|
||||
if (!single_step)
|
||||
DOLOG(debug, false, "---");
|
||||
|
||||
c->step_a();
|
||||
|
||||
if (trace_start_addr != -1 && c->getPC() == trace_start_addr)
|
||||
tracing = true;
|
||||
|
||||
if (tracing || single_step)
|
||||
disassemble(c, single_step ? cnsl : nullptr, c->getPC(), false);
|
||||
|
||||
if (c->check_breakpoint() && !single_step) {
|
||||
cnsl->put_string_lf("Breakpoint");
|
||||
break;
|
||||
}
|
||||
|
||||
if (*stop_event == EVENT_INTERRUPT) {
|
||||
|
|
Loading…
Add table
Reference in a new issue