Hacker News new | past | comments | ask | show | jobs | submit login
VT100 Machine Emulator in JavaScript (pcjs.org)
80 points by DiabloD3 on Jan 31, 2022 | hide | past | favorite | 31 comments



- F9 to enter setup

- 4 to switch to Local mode

- Shift+S to save setup

- F9 to exit setup

- Type something. Say hello!

- Ctrl+H for backspace, Ctrl+J for a linefeed, Ctrl+N or Enter for a newline

Also, the "VT100 connected to an IBM PC AT" link above is pretty remarkable, to me - I always used PC-DOS via the default framebuffer, so I didn't know this was possible!


> Ctrl+H for backspace, Ctrl+J for a linefeed, Ctrl+N or Enter for a newline

It is also worth pointing out that having the enter key send a CR+LF pair instead of just a CR is a setup option in the terminal.

> Also, the "VT100 connected to an IBM PC AT" link above is pretty remarkable, to me - I always used PC-DOS via the default framebuffer, so I didn't know this was possible!

I'm not terribly surprised that DOS can interface with a serial console, although I was not specifically aware of the feature.

One thing that is rather interesting about this is that you can easily tell if an application is using the DOS IO routines for IO (because those get sent to the COM port), vs interfacing with the VGA hardware directly since that appears in the VGA framebuffer.

For example, I tried installing windows 1.0 in the emulator, and all the setup screens bypassed the COM port for both input and output until it reached the very end, and then it output a few final messages via DOS IO commands (so they went to the terminal).


Oh yes, DOS could redirect to a serial link using the CTTY command, like CTTY COM1 or CTTY AUX.

Many DOS applications, however, wrote directly to text video memory at b0000h. Those... wouldn't work over serial link. You might be able to get WordStar to work using its ANSI.SYS display installation.


as I just discovered running fdisk on the default disk a>


Ctrl+M (not Ctrl+N) for a newline surely. 0x0a is line feed, 0x0d is carriage return, J is the 10th letter of the alphabet, M is the 13th.


On Firefox, F9 switches to reader mode. To disable, go to about:config and set reader.parse-on-load.enabled to false. Reload the page.


How can you make it do anything with the "VT100 connected to an IBM PC AT" mode?


"The DOS command CTTY COM2 uses the VT100 for console operations"

Or you might have some other DOS software listening on the serial port. Kermit, some BBS, etc.


I should have added that I never used terminals before, so that little hint is unfortunately is not that helpful for me.

Edit: nevermind, I got it, it's like SSH-ing to a server.


More like a physical and real terminal instead of a terminal emulator, displaying up a shell once the computer sends you the connection bits here and there.

Also you could interface modems by serial and you could send commands over the wire. More like telnet than ssh.


Setup that i use for a vt520 on com1, 9600 baud, 8 bits, no parity:

C>MODE COM1:9600,N,8,2

C>CTTY COM1

You can also do it from the autoexec.bat if you want to.


Fun with terminals for those who have never experienced them:

Run Sim390[1] with MUSIC/SP. Then get a TN3270 virtual terminal software to connect to it.

3270 is screen-based--think of it like filling out web forms and submitting, then receiving the results. This is far different than line-based terminals (e.g. your typical *nix TTY).

Compared to IBM's terminals, DEC's terminals seem completely unremarkable.

[1] https://www.canpub.com/teammpg/de/sim390/index.htm


In the 90s , I wrote Windows C++ software that talked to hundreds of different 3270 applications in a very difficult attempt to screen-scrape them and display the data in a modern windows UI. It was difficult. Then take user input and submit it as a form back to the 3270 application.

It would have much easier if the applications were TTY line-based.


In 2000 and 2001, I used software like that ("TSS") as a customer service rep for MBNA, which has since been bought out by Bank of America.

It was incomplete, as anything offering a WinForms GUI over a 3270 client would necessarily be, but still very useful. A 3270 terminal emulator was also available; most folks quickly learned to use it for tasks the GUI didn't support, and some of us ended up preferring it for some tasks the GUI did support since it tended to be much more accommodating of muscle memory.

In retrospect, it must've been a real engineering challenge to integrate with a 3270 client whether via screen-scraping or the wire protocol. Like HTML, but with structural information only designed to be parsed by the terminal, or in the screen-scraping case with no structural information at all.


Interesting experience. Maybe I did that in the early 2000s after all, and not the 90s. I don’t recall.


On the other hand, it couldn't have been WinForms since that debuted the year after I quit that job, so maybe it's my recollection that's somewhat faulty. It was a long time ago!


It was MFC for me, not WinForms.


I didn't realize that the famous VT100 terminal actually had a full 8080 microcontroller.

Has anyone tried adding extra hardware to a VT100 to enable it to run CP/M using the terminal's own 8080 CPU? ;-)

Then again you could add a Raspberry Pi inside it that would emulate most systems of that era faster than the original hardware - not to mention being able to run BSD or Linux natively and fairly capably.

edit: apparently the VT100 has an internal "Standard Terminal Port" connector which you could plug expansion hardware into, like a PDP-8 or CP/M board... or a modern microcontroller board like a Pi or a BeagleBone:

https://www.brendanp.com/vt100-beaglebone-mod/


When I was a high school senior in the 1980s I worked for a company making a VT100 clone (it also emulated several other popular terminals) The processor was a 6502. I can't remember how much RAM it had, but it had an 8k ROM.

When I started on the project we were using 12k of EEPROM. The lead developer and I spent about a week optimizing the firmware to reduce the ROM requirements to 8k. For debugging we used logic analyzer traces. Fun times!

I remember that we called this a "smart terminal" because it had so many functions.


It did, the earlier ones like the VT05 (and perhaps the VT50/52) didn't as far as I recall. They had a ton of boards with a whole lot of discrete logic! A bit like the early computers where the 'processor' was not a chip but also several boards with discrete logic chips.

As a result, those earlier terminals are even harder to emulate as there wasn't really much 'firmware' and definitely no standard CPU architecture. However those were pretty barebones anyway in terms of control codes.

I loved the VT05's design though. It looks really star trek. It won't fit on a modern desk because of the depth (all those custom boards take up a ton of space) but it looks so cool.

http://www.columbia.edu/cu/computinghistory/decvt05.jpg


Rogue in the browser! https://www.pcjs.org/software/pcx86/game/other/1985/rogue/

This is awesome, I've played Roguelikes but never the original. Cool art and transitions, feels really similar to Brogue(CE), which is still being maintained!


https://bellard.org/jslinux/vm.html?cpu=riscv64&url=fedora33...

Also try this fedora 33 running with XWindows running under riscv64 by the famous Fabrice Bellard.


There was a VT320 which was more advanced - might as well emulate that. https://en.wikipedia.org/wiki/VT320


This isn't an emulation. They're running the original firmware on an emulated 8080.


That's like saying Dolphin isn't an emulator as it runs the original firmware on an emulated PowerPC.


Yeah it would be great to see that done for a more modern VT too though!

Especially because a 100% perfect emulator doesn't really exist.


I think you meant something like "This isn't an communication-level VT emulation".


It is. Emulators emulate the CPU everywhere.



I long to run my own emulated VAX/VMS system, but the hobby licensing system is no more.

VT100 connected to a VAX would be amazing.


> I long to run my own emulated VAX/VMS system, but the hobby licensing system is no more.

You can set the clock back to the time when the license was valid and it all works. There is also a key generator floating around.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: