Git Product home page Git Product logo

pdp11's Introduction

This repo contains the source code for my PDP-11 emulation endeavours.

Contents

  • a PDP-11/05 cpu (KD11B) implemented from the microcode listing, but not emulating the actual microcode. Passing ZKAAA-ZKAMA. This is based on the code I wrote for the Knight TV emulation
  • a PDP-11/20 cpu (KA11) as a modified KD11B. Not implemented from the schematics (yet?). Passing ZKAAA-ZKAMA.
  • a PDP-11/40 cpu (KD11A) implemented from the microcode and schematics, but not emulating the actual microcode. With KJ11 and KT11.
  • a PDP-11/40 cpu running actual microcode. It needs a PiDP-11 panel and since as of now it is about 4-5x too slow on a raspi3 it is not finished.
  • the beginnings of a PDP-11/45 (KB11A) cpu. Implemented from the schematics and running the microcode. This machine is a beast so it doesn't do a whole lot at all yet.
  • KL11 console
  • KW11 line clock
  • KE11 extended arithmetic unit implemented from the algorithm explanation in the manual. Not tested terribly well.
  • simple memory

Plan

What I'd like is accurate emulation of the early PDP-11 cpus, i.e. 11/05, 11/20, 11/40, 11/45, 11/70, and at least the most important peripherals. For the 11/45 and /70 (KB11 based) I want microcode emulation to drive a PiDP-11 panel super duper accurately. For the other machines microcode emulation would be interesting as well but it's not quite as important to me.

Another goal is to have these work on an actual Unibus with Jörg Hoppe's Unibone. In fact, the 11/20 was made to work in a couple of hours when we noticed we had implemented almost the same unibus interface and could just hook up my code as a unibone device.

Notes

The style in which I've written the KA11 and KD11B is a bit idiosyncratic. The idea was to try and see how compact the code could be. I have to say I like it but apologize if you don't.

To-do

  • implement DATIP correctly (currently done for KD11A and B)
  • introduce #ifdef UNIBONE so we can maintain the code in one repo

pdp11's People

Contributors

aap avatar larsbrinkhoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdp11's Issues

tv11: uint undefined.

@erkyrath can't build on MacOS. I don't see uint defined anywhere, and I believe it's not a standard typedef.

cc -O3   -c -o ka11.o ka11.c
ka11.c:258:6: error: expected ';' after expression
        uint by;
            ^
            ;
ka11.c:258:2: error: use of undeclared identifier 'uint'

Build broken

Typing make in clean repo:

cc -Wall -Wno-parentheses -fno-diagnostics-color -fno-diagnostics-show-caret -O3 -DAUTODIAG  -o pdp1120 1120.o ka11.o kw11.o kl11.o eae.o mem.o util.o
make: *** No rule to make target 'kd11a.h', needed by '1140.o'.  Stop.

Update tvcon for SAIL Data Disc display

Update the protocol to accommodate the Data Disc display and SAIL keyboard.

  • Different resolution: 512x480 pixels.
  • Different keyboard layout.
  • Updates are in scanline segments of 6 or 8 pixels.

HiDPI

With a 4K display, tvcon -2 is a bit small.

tvcon: Set window title and icon

For the benefit of window managers, set the tvcon window title and an icon.

I think SDL_WM_SetCaption and SDL_WM_SetIcon are the APIs to use. Or maybe those are SDL1 only, and SDL_SetWindowTitle and SDL_SetWindowIcon are the SDL2 versions.

Errors and warnings building on Mac

@eswenson1 discovered some errors and warnings building tv11 on Mac. Presumably this uses a recent version of clang we may not have encountered before.

/Library/Developer/CommandLineTools/usr/bin/make -C tools/tv11 tv11 CFLAGS=-O3
cc -O3   -c -o tv11.o tv11.c
tv11.c:97:1: warning: incompatible redeclaration of library function 'log' [-Wincompatible-library-redeclaration]
log (char *format, ...)
^
tv11.c:97:1: note: 'log' is a builtin with type 'double (double)'
1 warning generated.
cc -O3   -c -o tv.o tv.c
tv.c:287:18: warning: & has lower precedence than <; < will be evaluated first [-Wparentheses]
        curbuf = (*creg & BUFMASK < NUMFBUFFERS) ? &tv->buffers[*creg & BUFMASK] : nil;
                        ^~~~~~~~~~~~~~~~~~~~~~~
tv.c:287:18: note: place parentheses around the '<' expression to silence this warning
        curbuf = (*creg & BUFMASK < NUMFBUFFERS) ? &tv->buffers[*creg & BUFMASK] : nil;
                        ^ ~~~~~~~~~~~~~~~~~~~~~
tv.c:287:18: note: place parentheses around the & expression to evaluate it first
        curbuf = (*creg & BUFMASK < NUMFBUFFERS) ? &tv->buffers[*creg & BUFMASK] : nil;
                  ~~~~~~^~~~~~~~~
tv.c:505:2: error: call to undeclared function 'writen'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        writen(con->fd, largebuf, 3+8+WIDTH*HEIGHT/8);
        ^
tv.c:505:2: note: did you mean 'write'?
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:496:10: note: 'write' declared here
ssize_t  write(int __fd, const void * __buf, size_t __nbyte) __DARWIN_ALIAS_C(write);
         ^
tv.c:549:3: error: call to undeclared function 'writen'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                writen(tv->cons[tv->omap[osw]].fd, buf, 7);
                ^
tv.c:732:3: error: call to undeclared function 'writen'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                writen(con->fd, largebuf, 3+8+w*h*2);
                ^
1 warning and 3 errors generated.

tv11: Door and elevator outputs

The elevator and door outputs occupy four bits in the KMS register.

I suggest the tv11 emulator should detect when writes happen and send those bits to an external program. Maybe if there is an environment variable set, that is a name of a program to run as a child process. The tv11 can send the data to the stdin of the child.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.