Image Map Image Map
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Simulating PDP-8 on a PDP-11?

  1. #1

    Default Simulating PDP-8 on a PDP-11?

    I have an 11/23+ with 4 MB RAM, a pair of RL02's, a 3.5" floppy, 16 serial lines and TSX-Plus.
    While thinking of interesting things to do with it, I wondered if there is any existing program that simulates a PDP-8?
    It would be neat to have one of the terminals talking to a virtual PDP-8 with OS/8.
    Is this impractical due to the speed, or lack thereof, of the 11/23+? Or has nobody attempted it? Or is it just plain nuts?

  2. #2
    Join Date
    Jun 2012
    Location
    UK - Worcester
    Posts
    3,000

    Default

    It should be practical; it is nuts (but that has never stopped any of us before has it) and it could be done fairly simply in MACRO-11.

    But I'm on holiday...

    Dave

  3. #3

    Default

    Quote Originally Posted by daver2 View Post
    It should be practical; it is nuts (but that has never stopped any of us before has it) and it could be done fairly simply in MACRO-11.

    But I'm on holiday...

    Dave
    Absolutely - I once wrote one to run on a DG Nova (papertape and terminal only though) and I remember people mentioning different incarnations on a forum years ago. It wouldn’t be fast of course as each pdp8 instruction will take quite several pdp11 ones but it’s quite workable. Running OS/8 implies sorting out some device handlers too of course - perhaps to interface with your existing hardware - a bit more of a challenge. OS/8 isn’t interrupt based but for completeness .....? It can be as simple or complex as you choose.

  4. #4
    Join Date
    Aug 2015
    Location
    Virginia, USA
    Posts
    28

    Default

    I swear that I saw something on an old DECUS tape listing years ago which would allow you to do this, but it could only emulate the processor instructions, so no peripherals. It may have been more of a primitive JIT VM than an emulator though, or a sort-of cross compiler/interpreter which would let you load PDP8 paper tape.

    It's obviously possible with enough memory but it'd be tremendously slow without some serious low level optimization, depending on what you want to use it for and how you want to run it (under an OS or with a raw bootloader).

  5. #5

    Default

    I was thinking more of being able to sit at one of the PDP-11's terminals and have the experience of talking to a PDP-8... We could call that an Olsen test instead of Turing
    That would imply an operating system (such as OS/ since there'd be no way to enter RIM or other bootloaders.

  6. #6
    Join Date
    Apr 2017
    Location
    Switzerland
    Posts
    239

    Default

    How fast was a PDP–8 in terms of instruction per second? I have never written an emulator on a PDP-11 but on a AVR I have written a Apple II emulator which used about 10 to 20 AVR instruction to emulate a 6502 instruction. However the clock of a AVR is much higher so the result was slightly faster than a real Apple II. Is there a recommended document that would give an verview of what would be required to be emulated not only instructions but as well IO?

  7. #7

    Default

    Not very fast... I believe the basic cycle time was 1.2 uS and most instructions were one cycle.

  8. #8
    Join Date
    Jun 2012
    Location
    UK - Worcester
    Posts
    3,000

    Default

    >>> That would imply an operating system (such as OS/8) since there'd be no way to enter RIM or other bootloaders.

    Why not? You can emulate the IOT instructions themselves. You can convert the serial IOTs to talk to a DLV11/J and the disk IOTs to talk to something like an RQDX3 (but using fewer of the blocks to align with what your PDP-8 device driver expects).

    You should be able to get the 'full experience'...

    Dave

  9. #9

    Default

    Quote Originally Posted by cbscpe View Post
    How fast was a PDP–8 in terms of instruction per second?
    Later models were faster, for the most part, but as Wikipedia states, the original "straight-8" had a memory cycle time of 1.5 μs (the 8/e was 1.2 μs, as DrCharles notes.) Most of the main-group instructions are two-cycle (unless they perform an indirect reference, which requires another cycle,) while the OPR instructions are single-cycle. So the speed on the original model is somewhere in the range of ~222-666 KIPS, depending on the code, while on the 8/e it'd be ~277-833 KIPS.
    Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
    Synthesizers: Roland JX-10/SH-09/MT-32/D-50, Yamaha DX7-II/V50/TX7/TG33/FB-01, Korg MS-20 Mini/ARP Odyssey/DW-8000/X5DR, Ensoniq SQ-80, E-mu Proteus/2, Moog Satellite, Oberheim SEM
    "'Legacy code' often differs from its suggested alternative by actually working and scaling." - Bjarne Stroustrup

  10. #10
    Join Date
    Aug 2010
    Location
    Silicon Valley USA
    Posts
    800
    Blog Entries
    4

    Default

    Back in 1978 or so when the PDP-11/60 first came out it offered something new for the PDP-11
    series, a writable RAM-based microprogrammable option, and there were some tools developed to
    write and assemble microcode under RT-11. The WCS option was 1K of microwords IIRC.

    Richie Lary of the PDP-8 world (his name appears a lot in the OS8 software sources) then was also
    doing some microcode consulting on the PDP-11/60 project. As he indicates below in an interview
    in 2015 for the Computer History Museum (portion extracted) he implemented an emulator for the
    PDP-8 in 11/60 microcode and then others built it into a version of RSTS to provide a virtual time
    shared PDP-8 that was, at the time, the fastest PDP-8 available.

    So, not quite writing a PDP-8 emulator in PDP-11 code, but the user interface would be similar.
    The main difference is (probably) a 10X performance speedup of microcode vs macrocode.

    Don

    Code:
    Lary: Microcode words tend to be very wide and, although later people have actually succeeded
    in doing this, [it tends] to be very difficult to do any kind of machine translation to write a
    high-level language that converts into microcode. So it is all hand coding, which of course I was
    great at, and the other thing was that microcode used to fit in a read-only memory, or at least
    a very hard to modify memory. You could do updates to it, [however].. Which meant you only had
    so much [memory] and this is where my skills at turning N words into N minus 1 came in handy.
    So I became a microcoder on the PDP-11/60, helped write some of that code for floating point
    and some other things.
    
    And then as a hack, I wrote a PDP-8 emulator in microcode for the PDP-11/60. A friend of mine,
    Mark Bramhall, who was doing RSTS, built a shell in RSTS that we could run PDP-8 code native
    on this PDP-11 and it would run on PDP-8 speeds. Because the 11/60 was a pretty fast machine
    and the PDP-8 guys who were left who were still doing PDP-8 development, they used that as
    their development platform. They had a virtualized emulated PDP-8 that was time shared that
    ran at PDP-8 speeds, and that they could access from their offices as a time sharing system
    and run multiple jobs on and stuff like that. And they used it for the next 10 years to develop
    PDP-8 software.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •