Skip to content

sictransit/core8

Repository files navigation

core8 - A PDP-8/E emulator in C#

This is my first attempt to write an emulator. Ever! It is work-in-progress and might even be finished eventually.

The emulator is stable enough to boot OS/8 and run TINT8, the PDP-8 version of a popular tile-matching puzzle video game. You can even play ADVENT (Colossal Cave) on it.

Have fun!

Test-driven development - MAINDEC

The following MAINDEC diagnostics have been tested and run successfully.

In fact that's how I implemented the emulator. Run the tests, fix the code, ... Loop until the emulator passes for a real machine.

  • MAINDEC-8E-D0AB-PB: Instruction Test Part 1
  • MAINDEC-8E-D0BB-PB: Instruction Test Part 2
  • MAINDEC-8E-D0CC-PB: Adder Test
  • MAINDEC-8E-D0DB-PB: Random AND Test
  • MAINDEC-8E-D0EB-PB: Random TAD Test
  • MAINDEC-8E-D0FC-PB: Random ISZ Test
  • MAINDEC-8E-D0GC-PB: Random DCA Test
  • MAINDEC-8E-D0HC-PB: Random JMP Test
  • MAINDEC-8E-D0IB-PB: Basic JMP-JMS Test
  • MAINDEC-8E-D0JC-PB: Random JMP-JMS Test
  • MAINDEC-8E-D1EC-PB: Memory Address Test
  • MAINDEC-8E-D1FB-PB: Extended Memory Address Test
  • MAINDEC-8E-D1HA-PB: Memory Extension and Time Share Control Test

Options

Emulator 1.0.0
Mikael Fredriksson <micke@sictransit.net>

--tint               (Default: false) play TINT

--palbart            (Default: c:\bin\palbart.exe) PALBART executable, required for assemble

--assemble           PAL assembly file

--load               load bin format paper tape

--run                (Default: false) run the assembled file

--tty                (Default: false) dump tty output to console

--startingaddress    (Default: 200) starting address

--dumpmemory         (Default: false) dump memory

--os8                (Default: false) boot OS/8

--advent             (Default: false) run ADVENT

--debug              (Default: false) debug mode

--convert            convert ASCII string to octal words

--punch              punch paper tape, i.e. copy bin image

--help               Display this help screen.

--version            Display version information.

PALBART

There is support for an assembler, provided you have the required PALBART binary. It can be found, or built, if you need it.

RIM/BIN loaders

RIM and BIN loaders are already loaded into "core" memory for you convenience.

Terminal server

In lack of a proper teletype, I implemented a terminal server of sorts. You can connect to it using e.g. Putty.

ASR33 style teletype + SVG punch

There is a working teletype (device 03/04) implementation, including an SVG paper tape punch. It is quite an anachronism, but I needed it for a reason.

Of course, the SVG punch can also read SVG paper tapes.

image

Line Printer

I've cloned the printer part of the teletype to implement a line printer. It was necessary to boot some RK05 disks.

Work in Progress

RX8E/RX01

The implementation of a floppy controller + drive is very much work-in-progress. 8-bit mode is not implemented, nor is deleted sectors. Error register handling is probably also defunct.

It is at least able to boot OS/8 from a disk image.

image

RK8E/RK05

I realized I'll need support for the cartridge disks as well, at least to be able to load and boot some of the more interesing images out there. Now you can play ADVENT on the emulator, which was actually my goal from the beginning and why I started coding the emulator.

image

TODO

When I haven't refactored everything in a while, I might fix issues like Type 'MQRelay' owns disposable field(s) 'publisherSocket, subscriberSocket' but is not disposable. For now, it is not a priority! I know how and when to use the using {} pattern.