• vt100 terminal emulator in a FPGA - how small can the FPGA be?

    From Torfinn Ingolfsen@21:1/5 to All on Sat Apr 8 00:57:49 2017
    I'm currently learning to program FPGA's by going through the course
    from Nandland[1] - I bought the Go board[2] on the Kickstarter but
    haven't touched it until now. The lessons are going great, but I'm
    thinking I need a project of my own design to sort of "finish" the course.

    For various reasons (like - it can be done) I'm thinking about writing a
    vt100 (compatible) terminal emulator. All you need is a display, a
    keyboard and a serial port, right?

    The question is - is the ICE40 HX1K FPGA (1280 logic cells) big enough
    to squeeze a terminal emulator into?
    Or do I need a bigger FPGA?

    I've found only a few examples on the internet, but all seems to be
    using much larger FPGAs:
    fpga-vt[3] - Altera Cyclone II, 5000 LEs (using about 2500 LEs[4])


    References:
    1) https://www.nandland.com/
    2) https://www.nandland.com/goboard/introduction.html
    3) https://github.com/howardjones/fpga-vt
    4) https://hackaday.io/project/7165-fpga-serial-terminal
    --
    Torfinn Ingolfsen,
    Norway

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Dorsey@21:1/5 to tingo@home.no on Fri Apr 7 20:47:58 2017
    Torfinn Ingolfsen <tingo@home.no> wrote:
    For various reasons (like - it can be done) I'm thinking about writing a >vt100 (compatible) terminal emulator. All you need is a display, a
    keyboard and a serial port, right?

    The question is - is the ICE40 HX1K FPGA (1280 logic cells) big enough
    to squeeze a terminal emulator into?
    Or do I need a bigger FPGA?

    Take a look at the ADM3A which was a complete (though non-ANSI) terminal
    made with a couple hundred gates, some static ram, and an encoder rom.

    You could do a lot better than that with a modern FPGA. I don't know if
    you could do the complete vt100 command set so easily, but certainly a adm3a would be something I'd expect a student to be able to do.
    --scott

    --
    "C'est un Nagra. C'est suisse, et tres, tres precis."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard@21:1/5 to All on Sun Apr 9 00:05:01 2017
    [Please do not mail me a copy of your followup]

    Hi Tingo :)

    Torfinn Ingolfsen <tingo@home.no> spake the secret code <oc95bu$buv$1@dont-email.me> thusly:

    For various reasons (like - it can be done) I'm thinking about writing a >vt100 (compatible) terminal emulator. All you need is a display, a
    keyboard and a serial port, right?

    You might want to look at this: <http://www.sparetimegizmos.com/Hardware/VT.htm>

    It's using a microprocessor for most of the behavior, but it is a
    similar project to yours.

    I've got a pile of 68HC05s laying around and I've considered doing a
    similar project to the VT4/5/6 above.

    The question is - is the ICE40 HX1K FPGA (1280 logic cells) big enough
    to squeeze a terminal emulator into?

    1280 logic cells doesn't sound like much, but there's a bunch you can
    do in fixed combinatorial logic to implement a terminal. You will
    definitely need a larger FPGA if you want to code the terminal
    behavior in firmware and use a CPU (custom or stock) to execute the
    firmware. The firmware approach is the one adopted by all terminals
    since the mid 80s.

    However, terminal designs prior to that used fixed logic. Here are
    some pointers to design documents for terminals that use fixed logic.

    ECMA-48 defines the ANSI escape sequences. Most terminals (including
    the VT100) do not implement all of the escape sequences. <http://www.ecma-international.org/publications/standards/Ecma-048.htm>

    Browsable ANSI code chart: <http://terminals-wiki.org/wiki/index.php/CodeChart:ANSI>

    <http://terminals-wiki.org/wiki/index.php/Beehive_B100> <http://manx-docs.org/details.php/74,18504> (schematics in the back)

    This terminal uses fixed logic to implement fairly complicated
    functionality including protected fields and block transfer mode.
    It doesn't use ANSI escape sequences, but has a fairly large
    repertoire:
    <http://terminals-wiki.org/wiki/index.php/CodeChart:Beehive_B100>

    I've studied this design quite a bit. It's basically a giant
    state machine with the transition table implemented in a PAL/PROM.
    The machine has a bunch of registers that contain the state of the
    display: cursor position, etc. The state machine controls
    updating the screen from either the keyboard or the host as well
    as scan out of the screen to the printer port or the host port for
    block mode. There is a big flow chart in the manual that shows
    the control flow for the state machine.

    <http://terminals-wiki.org/wiki/index.php/Beehive_Mini_Bee> <http://manx-docs.org/details.php/74,16338>

    Another 70s beehive terminal that uses fixed logic to implement a
    fairly rich repertoire of escape sequences. Again, not ANSI.

    <http://terminals-wiki.org/wiki/index.php/Basic_Four_7220>

    Basic Four had some terminals that implemented everything in
    discrete logic. Again, not ANSI escape sequences. The ANSI
    standard came out right around the time of the VT100, so most
    fancy terminals before that did not implement anything like the
    ANSI sequences.

    <http://terminals-wiki.org/wiki/index.php/Tektronix_4010>

    Not a raster display terminal, but the 401x series of Tektronix
    graphics terminals all used discrete logic in their handling of
    escape sequences. The logic here is simpler since they don't need
    to handle refresh of any display memory, just drive the electron
    beam to stroke the display. The character mode stuff is a little
    more involved to lookup a dot pattern from a character generator
    ROM and then strobe dots onto the screen to draw the character.
    It's another state machine design with a very simple state
    machine.

    There are other terminals that implement everything in discrete logic,
    but they are either printing terminals (DEC LA36), or there aren't
    good design/service documentation online for them.

    Give a shout out here if you want to talk more design possibilities on terminals.
    --
    "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
    The Terminals Wiki <http://terminals-wiki.org>
    The Computer Graphics Museum <http://computergraphicsmuseum.org>
    Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard@21:1/5 to All on Sun Apr 9 00:18:09 2017
    [Please do not mail me a copy of your followup]

    kludge@panix.com (Scott Dorsey) spake the secret code <oc9bvu$rv8$1@panix3.panix.com> thusly:

    Torfinn Ingolfsen <tingo@home.no> wrote:
    For various reasons (like - it can be done) I'm thinking about writing a >>vt100 (compatible) terminal emulator. All you need is a display, a
    keyboard and a serial port, right?

    The question is - is the ICE40 HX1K FPGA (1280 logic cells) big enough
    to squeeze a terminal emulator into?
    Or do I need a bigger FPGA?

    Take a look at the ADM3A which was a complete (though non-ANSI) terminal
    made with a couple hundred gates, some static ram, and an encoder rom.

    <http://terminals-wiki.org/wiki/index.php/Lear_Siegler_ADM-3> <http://terminals-wiki.org/wiki/index.php/Lear_Siegler_ADM-3A>

    Yeah, that's another good one to look at, but it's escape sequence
    repertoire is fairly small. IIRC, it's got cursor positioning as it's
    fanciest sequence. The Beehive B100 repertoire is richer and doesn't
    use considerably more hardware resources.

    The ADM-3 (not 3A) just has clear screen. The 3A has:
    ESC ( Set foreground mode
    ESC ) Set background mode
    ESC =rc Set cursor position
    ESC Gx Set video attributes
    ESC 6 Send line all
    ESC o! Terminal reset
    ESC oS Terminal default
    ESC o9 Terminal info
    Ctrl+Z Clear screen

    So it doesn't have much in the way of editing the screen contents
    other than position cursor, write onto the screen and erase the
    screen.
    --
    "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
    The Terminals Wiki <http://terminals-wiki.org>
    The Computer Graphics Museum <http://computergraphicsmuseum.org>
    Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Torfinn Ingolfsen@21:1/5 to Scott Dorsey on Mon Apr 10 23:24:32 2017
    On 04/08/2017 02:47, Scott Dorsey wrote:

    Take a look at the ADM3A which was a complete (though non-ANSI) terminal
    made with a couple hundred gates, some static ram, and an encoder rom.

    Good tip - thanks!

    You could do a lot better than that with a modern FPGA. I don't know if
    you could do the complete vt100 command set so easily, but certainly a adm3a would be something I'd expect a student to be able to do.

    Good to know. :-)
    --
    Torfinn Ingolfsen,
    Norway

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Torfinn Ingolfsen@21:1/5 to Richard on Mon Apr 10 23:55:33 2017
    Hello Richard!

    On 04/09/2017 02:05, Richard wrote:

    You might want to look at this: <http://www.sparetimegizmos.com/Hardware/VT.htm>


    Ah - I had forgotten about that one. It has schematics, source and
    everything. Thanks for reminding me!

    1280 logic cells doesn't sound like much, but there's a bunch you can
    do in fixed combinatorial logic to implement a terminal. You will

    Yes, that is what I'm thinking too.

    However, terminal designs prior to that used fixed logic. Here are
    some pointers to design documents for terminals that use fixed logic.


    Thanks! I'll look at those, and see if I come up with a way to make a
    terminal with the FPGA I have.
    --
    Torfinn Ingolfsen,
    Norway

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard@21:1/5 to All on Tue Apr 11 16:17:43 2017
    [Please do not mail me a copy of your followup]

    Torfinn Ingolfsen <tingo@home.no> spake the secret code <ocguqt$dpr$1@dont-email.me> thusly:

    Thanks! I'll look at those, and see if I come up with a way to make a >terminal with the FPGA I have.

    Thinking off the top of my head for a minimal terminal with no escape sequences, you need:

    - cursor location register
    - ability to scroll lines upwards
    - erase display memory on startup
    - video scanout
    - keyboard input
    - host input
    - EOL wrapround on keyboard/host input

    To handle scroll up, some terminals (e.g. VT100) use an array of line
    pointers in memory and simply shuffle the pointers instead of moving
    all the data.

    Other terminals just treat display memory as a circular buffer and
    simply change where in the circular buffer the "top" display line is
    located for video scanout. I think this is how the Beehive B100
    treats it.
    --
    "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
    The Terminals Wiki <http://terminals-wiki.org>
    The Computer Graphics Museum <http://computergraphicsmuseum.org>
    Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Dorsey@21:1/5 to Richard on Wed Apr 12 13:39:57 2017
    In article <ocivj7$8lp$1@news.xmission.com>, Richard <> wrote:

    Thinking off the top of my head for a minimal terminal with no escape >sequences, you need:

    DON LANCASTER'S TV TYPEWRITER!
    --scott
    --
    "C'est un Nagra. C'est suisse, et tres, tres precis."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard@21:1/5 to All on Thu Apr 13 19:39:33 2017
    [Please do not mail me a copy of your followup]

    kludge@panix.com (Scott Dorsey) spake the secret code <oclopd$ohc$1@panix2.panix.com> thusly:

    In article <ocivj7$8lp$1@news.xmission.com>, Richard <> wrote:

    Thinking off the top of my head for a minimal terminal with no escape >>sequences, you need:

    DON LANCASTER'S TV TYPEWRITER!

    Yeah, that would be a good project to consult. Is the article online?
    --
    "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
    The Terminals Wiki <http://terminals-wiki.org>
    The Computer Graphics Museum <http://computergraphicsmuseum.org>
    Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Dorsey@21:1/5 to Richard on Thu Apr 13 15:59:34 2017
    In article <ocok5l$e5i$1@news.xmission.com>, Richard <> wrote: >kludge@panix.com (Scott Dorsey) spake the secret code ><oclopd$ohc$1@panix2.panix.com> thusly:

    In article <ocivj7$8lp$1@news.xmission.com>, Richard <> wrote:

    Thinking off the top of my head for a minimal terminal with no escape >>>sequences, you need:

    DON LANCASTER'S TV TYPEWRITER!

    Yeah, that would be a good project to consult. Is the article online?

    I have no idea, it's been forty years since I have even thought about it. --scott

    --
    "C'est un Nagra. C'est suisse, et tres, tres precis."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From roger.ivie@gmail.com@21:1/5 to Richard on Thu Apr 13 17:55:52 2017
    On Thursday, April 13, 2017 at 12:39:33 PM UTC-7, Richard wrote:

    DON LANCASTER'S TV TYPEWRITER!

    Yeah, that would be a good project to consult. Is the article online?

    Article? Book! https://archive.org/details/tvtcb_doc
    --
    roger ivie
    roger.ivie@gmail.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Dorsey@21:1/5 to Richard on Fri Apr 14 13:14:45 2017
    In article <ocqvqt$o0p$1@news.xmission.com>, Richard <> wrote: >roger.ivie@gmail.com spake the secret code ><5d94d479-742d-4a4a-af8a-80b9bbb26251@googlegroups.com> thusly:

    On Thursday, April 13, 2017 at 12:39:33 PM UTC-7, Richard wrote:

    DON LANCASTER'S TV TYPEWRITER!

    Yeah, that would be a good project to consult. Is the article online?

    Article? Book! https://archive.org/details/tvtcb_doc

    I thought it started just as an article in Popular Electronics or
    something?

    It did, yes.

    Anyway, thanks for the link. I really doubt that any of the chips he >discusses in that book are still available except as new old stock.
    Still, it is useful for design discussions. He's using a
    microprocessor to do most of the work, so I don't know how well that
    will help Tingo with his FPGA.

    I don't know what that web site is, but the original TV Typewriter came out before there was any such thing as a microprocessor. It's just stacks and stacks of TTL chips and miles of wirewrap and a homebuilt keyboard design
    so awful that I wouldn't wish it even on ADDS.
    --scott

    --
    "C'est un Nagra. C'est suisse, et tres, tres precis."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard@21:1/5 to All on Fri Apr 14 17:10:53 2017
    [Please do not mail me a copy of your followup]

    roger.ivie@gmail.com spake the secret code <5d94d479-742d-4a4a-af8a-80b9bbb26251@googlegroups.com> thusly:

    On Thursday, April 13, 2017 at 12:39:33 PM UTC-7, Richard wrote:

    DON LANCASTER'S TV TYPEWRITER!

    Yeah, that would be a good project to consult. Is the article online?

    Article? Book! https://archive.org/details/tvtcb_doc

    I thought it started just as an article in Popular Electronics or
    something?

    Anyway, thanks for the link. I really doubt that any of the chips he
    discusses in that book are still available except as new old stock.
    Still, it is useful for design discussions. He's using a
    microprocessor to do most of the work, so I don't know how well that
    will help Tingo with his FPGA.
    --
    "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
    The Terminals Wiki <http://terminals-wiki.org>
    The Computer Graphics Museum <http://computergraphicsmuseum.org>
    Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard@21:1/5 to All on Fri Apr 14 17:26:03 2017
    [Please do not mail me a copy of your followup]

    kludge@panix.com (Scott Dorsey) spake the secret code <ocr025$52k$1@panix2.panix.com> thusly:

    In article <ocqvqt$o0p$1@news.xmission.com>, Richard <> wrote: >>roger.ivie@gmail.com spake the secret code >><5d94d479-742d-4a4a-af8a-80b9bbb26251@googlegroups.com> thusly:

    On Thursday, April 13, 2017 at 12:39:33 PM UTC-7, Richard wrote:

    DON LANCASTER'S TV TYPEWRITER!

    Yeah, that would be a good project to consult. Is the article online?

    Article? Book! https://archive.org/details/tvtcb_doc

    I don't know what that web site is, but the original TV Typewriter came out >before there was any such thing as a microprocessor.

    This scan says third edition copyright 2010(!).

    On pg. 14 he shows a block diagram of the system with a
    microprocessor, but it is marked optional. So yeah, all the keyboard
    input, character scanout and display memory updating are all done from
    discrete circuits. There are three versions of the tvt shown in the
    book.

    Skimming a little more carefully, the chapters on system timing and
    cursor and update would probably be useful from a design perspective,
    even if you won't use the parts he uses in the tvt.
    --
    "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
    The Terminals Wiki <http://terminals-wiki.org>
    The Computer Graphics Museum <http://computergraphicsmuseum.org>
    Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)