PDP-11/70 emulator
Find a file
2025-04-05 15:35:07 +02:00
.github submodules 2024-05-16 17:53:38 +02:00
arduinojson@071f718473 replacing libjansson by arduinojson 2024-05-13 20:50:03 +02:00
BIC list of files 2024-05-01 23:26:24 +02:00
ESP32 code clean-up 2025-03-30 22:44:21 +02:00
json verify MMR* registers 2024-04-12 18:04:03 +02:00
RP2040 missing files for RP2040 target (broken!) 2024-05-10 16:58:27 +02:00
tests comments 2024-04-23 21:48:45 +02:00
work/werkend-mu logfiles 2025-04-01 12:28:15 +02:00
.gitignore RL02 verification code 2024-04-23 21:30:34 +02:00
.gitmodules replacing libjansson by arduinojson 2024-05-13 20:50:03 +02:00
.lgtm.yml meta 2022-03-21 20:45:10 +01:00
benchmark.txt misc 2025-04-02 23:04:05 +02:00
breakpoint.cpp breakpoints 2024-04-16 10:52:12 +02:00
breakpoint.h breakpoints 2024-04-16 10:52:12 +02:00
breakpoint_and.cpp breakpoints 2024-04-16 10:52:12 +02:00
breakpoint_and.h breakpoints 2024-04-16 10:52:12 +02:00
breakpoint_memory.cpp sanitized peek_word() 2024-06-24 18:45:01 +02:00
breakpoint_memory.h memory breakpoint 2024-04-16 14:22:06 +02:00
breakpoint_or.cpp breakpoints 2024-04-16 10:52:12 +02:00
breakpoint_or.h breakpoints 2024-04-16 10:52:12 +02:00
breakpoint_parser.cpp memory breakpoint 2024-04-16 14:22:06 +02:00
breakpoint_parser.h breakpoints 2024-04-16 10:52:12 +02:00
breakpoint_register.cpp camel case get/setRegister 2024-06-24 09:28:33 +02:00
breakpoint_register.h psw breakpoint 2024-04-16 20:10:02 +02:00
bus.cpp Due to difficulties with python & external processes, the json-verification is now a c++ solution. 2025-04-03 23:12:48 +02:00
bus.h Due to difficulties with python & external processes, the json-verification is now a c++ solution. 2025-04-03 23:12:48 +02:00
CMakeLists.txt micro opt 2025-04-01 07:53:25 +02:00
comm.cpp deserialize dc11-configuration 2024-05-20 20:14:39 +02:00
comm.h comm & dc11 devices serialization 2024-05-20 16:34:16 +02:00
comm_posix_tty.cpp comm & dc11 devices serialization (posix) 2024-05-20 16:41:52 +02:00
comm_posix_tty.h comm & dc11 devices serialization (posix) 2024-05-20 16:41:52 +02:00
comm_tcp_socket_client.cpp sleep while locked 2024-06-26 20:41:44 +02:00
comm_tcp_socket_client.h comm & dc11 devices serialization 2024-05-20 16:34:16 +02:00
comm_tcp_socket_server.cpp working DC11 2024-06-10 15:32:00 +02:00
comm_tcp_socket_server.h comm & dc11 devices serialization 2024-05-20 16:34:16 +02:00
console.cpp timestamps in output / reduced panel screenrate 2024-06-12 22:35:28 +02:00
console.h timestamps in output / reduced panel screenrate 2024-06-12 22:35:28 +02:00
console_ncurses.cpp code clean-up 2025-03-30 22:44:21 +02:00
console_ncurses.h Call to virtual method ... during construction bypasses virtual dispatch (scan-build / clang analyzer) 2024-04-28 01:51:26 +02:00
console_posix.cpp clean-up (pipe handling) 2025-04-03 21:55:12 +02:00
console_posix.h clean-up 2024-05-10 23:25:24 +02:00
cpu.cpp PSW bit masking for RTI/RTT 2025-04-05 15:35:07 +02:00
cpu.h ASH/ASHC cleanup & fix 2025-04-05 11:44:27 +02:00
dc11.cpp posix compile fix 2024-06-10 18:27:30 +02:00
dc11.h working DC11 2024-06-10 15:32:00 +02:00
dc11.json working DC11 2024-06-10 15:32:00 +02:00
debugger.cpp POC 2025-04-03 20:25:16 +02:00
debugger.h TRACE() 2024-05-04 19:23:40 +02:00
device.cpp missing file 2024-05-10 23:29:36 +02:00
device.h KW11-L state 2024-05-10 20:35:35 +02:00
disk_backend.cpp fixes for serialization 2024-05-16 10:14:48 +02:00
disk_backend.h fixes for serialization 2024-05-16 10:14:48 +02:00
disk_backend_file.cpp fixes for serialization 2024-05-16 10:14:48 +02:00
disk_backend_file.h fixes for serialization 2024-05-16 10:14:48 +02:00
disk_backend_nbd.cpp fixes for serialization 2024-05-16 10:14:48 +02:00
disk_backend_nbd.h fixes for serialization 2024-05-16 10:14:48 +02:00
disk_device.h Call to virtual method ... during construction bypasses virtual dispatch (scan-build / clang analyzer) 2024-04-28 01:51:26 +02:00
div.py remove any \r or \n 2024-04-04 21:22:35 +02:00
error.cpp getting rid of Serial.* (1) 2024-05-19 20:38:04 +02:00
error.h license 2023-03-26 21:47:42 +02:00
gcovr-json-diff.py coverage compare tool 2022-03-01 15:53:49 +01:00
gen.h due to memory fragmentation, can not have 12 pages in regular memory (ESP32) 2024-05-20 13:27:51 +02:00
kw11-l.cpp race in kw11-l 2024-06-26 20:53:34 +02:00
kw11-l.h Configurable line hz 2024-05-20 21:50:14 +02:00
LICENSE license date 2024-05-01 23:17:43 +02:00
loaders.cpp camel case get/setRegister 2024-06-24 09:28:33 +02:00
loaders.h connect rp06 to bus & bootloader 2024-06-12 22:59:56 +02:00
log.cpp loglevels 2025-04-03 16:11:24 +02:00
log.h clean-up 2024-05-13 19:38:07 +02:00
main.cpp verify both register sets 2025-04-05 14:38:46 +02:00
memory.cpp getting rid of Serial.* (1) 2024-05-19 20:38:04 +02:00
memory.h duplicate memory size check removed 2024-06-20 07:14:15 +02:00
mingw64.cmake restructured 2023-03-27 13:02:46 +02:00
mmu.cpp misc 2025-04-02 23:04:05 +02:00
mmu.h misc 2025-04-02 23:04:05 +02:00
raw_to_simh_bin.cpp license 2023-03-26 21:47:42 +02:00
README.md meta 2024-06-13 19:13:26 +02:00
rk05.cpp UnibusByte -> _unibus_byte 2024-06-20 07:10:14 +02:00
rk05.h fixes for serialization 2024-05-16 10:14:48 +02:00
rl02.cpp UnibusByte -> _unibus_byte 2024-06-20 07:10:14 +02:00
rl02.h fixes for serialization 2024-05-16 10:14:48 +02:00
rp06.cpp logging 2024-06-25 11:29:57 +02:00
rp06.h constant names 2024-06-13 17:53:15 +02:00
terminal.cpp license 2023-03-26 21:47:42 +02:00
terminal.h license 2023-03-26 21:47:42 +02:00
tm-11.cpp show device state 2024-05-10 20:15:55 +02:00
tm-11.h show device state 2024-05-10 20:15:55 +02:00
tty.cpp fixes for serialization 2024-05-16 10:14:48 +02:00
tty.h fixes for serialization 2024-05-16 10:14:48 +02:00
utils.cpp use : as splitter for ip/port 2024-05-21 11:56:19 +02:00
utils.h deserialize_file 2024-05-20 19:31:43 +02:00
win32.cpp restructured 2023-03-27 13:02:46 +02:00
win32.h restructured 2023-03-27 13:02:46 +02:00

KEK

Kek is a DEC PDP-11 (11/70) emulator capable of running UNIX-v7.

You need to retrieve the git repository with the --recursive switch for the git command:

git clone --recursive https://github.com/folkertvanheusden/kek

To build for e.g. linux:

mkdir build
cd build
cmake ..
make

Required:
* libncursesw5-dev

To build for e.g. windows:

mkdir build-win32
cd build-win32
cmake -DCMAKE_TOOLCHAIN_FILE=../mingw64.cmake ..
make

To run an RK05 disk image:

./kek -r filename.rk -R rk05 -b 2> /dev/null

To run an RL02 disk image:

./kek -r filename.rk -R rl02 -b 2> /dev/null

To run an RP06 disk image:

./kek -r filename.rk -R rp06 -b 2> /dev/null

To run a tape image:

./kek -T filename.bin -b 2> /dev/null

When you run UNIX 7, you can (if your system has enough RAM - use an ESP32 with 2 MB PSRAM or more) run multi-user via the DC-11 emulation. Note that UNIX 7 starts in single user mode first; press ctrl+d to switch to multi user (recognizable by the login-prompt). Also make sure to configure networking ('startnet') to be able to connect (using telnet) to the DC-11 ports (TCP port 1101 upto and including 1104).

ESP32

The ESP32 version needs platformio to be build.

cd ESP32
pio run -t upload
pio run -t uploadfs

That should build & upload it to a connected ESP32.

Wiring of SDCARD (or use disk-images exported via NBD over wifi using nbdkit (because of older NBD protocol implementation)):

  • MISO: 19
  • MOSI: 23
  • SCK : 18
  • SS : 5
  • and of course connect VCC/GND of the SD-card

Heart beat LED:

  • pin 25

Wiring of the MAX232 connection:

  • TX : 17
  • RX : 16 Note that you need to use different pins for the MAX232 connection when you want to use the PSRAM of the ESP32.

Raspberry PI PICO / RP2040

Wiring of SDCARD:

  • MISO: 16
  • MOSI: 19
  • SCK : 18
  • SS : 17
  • and of course connect VCC/GND of the SD-card

The RP2040 version needs platformio to be build.

cd RP2040
pio run

Then copy RP2040/.pio/build/BUILD_FOR_RP2040/firmware.uf2 to the PICO.

SHA2017-badge

This procedure will remove the default micropython environment. Maybe you can undo that, but I have not tried that.

  • esptool.py erase_flash

  • pio run -e SHA2017-badge

  • esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x1000 ./.pio/build/ESP32-wemos/bootloader.bin

  • pio run -e SHA2017-badge -t upload

After this, you can connect a serial terminal to /dev/ttyUSB0 at 115k2 bps.

more info

For more info: https://vanheusden.com/emulation/PDP-11/kek/

thanks

Thanks a lot to Neil Webber for his help and for his python PDP emulator (which allowed me to compare disassembly of runs). Neil's emulator can be found at https://github.com/outofmbufs/python-pdp11-emulator

Kek is released under MIT license.

Folkert van Heusden