Jump to content
IGNORED

Intellivision as Serial Terminal


intvnut

Recommended Posts

I originally posted this to INTVPROG, but I figured some of you here might find it interesting too if you don't normally hang out there.

 

 

I meant to do this literally YEARS ago. In fact, I apparently started on this about 4 years ago, actually, almost to the day.

 

Anyway, I had talked Chad into making the CC3's serial port accessible to software on the Intellivision. He opened up a handful of locations that he passes through more or less directly to the 16550-compatible UART on board. I'm pretty sure this feature made it into the final firmware revision, since it works on the two CC3s I've tried it on. I had planned to quickly write up a demo then and get the driver and demo software out there. I got it about 90% completed and then shelved it when life got too hectic. (Specifically, I had to wrap up Space Patrol.)

 

Well, because I want to use the code for something else, I decided to dust off the 90% complete code and make it more like 99% complete. :-) The result is visible in this YouTube video:

 

 

That's me hunting and pecking on an ECS Keyboard while logged into my Linux box over a serial cable that stretches from the CC3's serial port to my PC's serial port.

 

The terminal emulation is roughly VT-100 + ANSI color support. In the video, I'm using the Linux-based editor "vim" over the serial link. My code doesn't support all the escape sequences, but it supports enough of them to be usable. My serial terminal is able to keep up with 9600 baud ok. With more optimization effort, 19200 ought to be doable. In fact, I had 19200 working OK until I added the keyboard scanning, so it's on the cusp. I just can't be bothered.

 

I need to clean up the code a bit, sure, but rather than wait for me to get around to that, I figure I should publish what I've got. I've put the code here:

 

http://spatula-city.org/%7Eim14u2c/intv/dl/terminal.zip

 

The serial driver code is very, very simple. It sets up 8-N-1, 19200 baud by default. There are two main APIs, "CC3_XMIT" and "CC3_RECV", and currently they're both "blocking" APIs. The Terminal application gets around this by scanning the keyboard in the interrupt routine, calling CC3_XMIT from there, so that CC3_XMITs can happen while CC3_RECV is waiting for data. Not the cleanest way to do it, but it worked. I ought to add non-blocking variants of XMIT and RECV. There are two other functions: CC3_SERINIT for initialization, and CC3_SETBAUD for picking one of several baud rates.

 

The VT-100/ANSI emulation is a hoot. Feel free to poke your head in there if you're feeling crazy. It works, but I've made no attempt to optimize for anything other than the amount of time I was spending writing it.

 

The keyboard scanning code is simple to call. Just call "SCAN_KBD" and it will return KEY.NONE if no new key is pressed, or the ASCII code of the key pressed. For the arrow keys, I've adopted some control-key values. KEY.UP, KEY.DOWN, KEY.LEFT and KEY.RIGHT have the values I chose for these keystrokes. (One shortcoming of the Terminal program is that it doesn't convert the arrows into proper VT-100 arrow sequences. To do that, it'd have to look for these codes and send ESC [ A, ESC [ B, etc...)

 

I've mapped a number of punctuation keys via the CTRL key. Basically, CTRL + a number, or CTRL + an existing punctuation key will give you a new, sometimes related character. For example, curly braces are on CTRL+9 and CTRL+0, to pair up with the parentheses there. Square brackets are on CTRL+comma and CTRL+period to pair up with the angle brackets. Others were a bit more arbitrary. I'll have to sit down and write up the keymap.

 

Enjoy,

 

--Joe

  • Like 4
Link to comment
Share on other sites

  • 3 years later...

This is really cool. I'm a big fan of BBSing and I would love to call a BBS with an Intellivision.

 

So let me ask this, I have a CC3, need to make the serial cable, but once you have that, can you simply connect that serial cable to a modem and this program would be able to send AT commands to the modem like a regular terminal?

Link to comment
Share on other sites

This is really cool. I'm a big fan of BBSing and I would love to call a BBS with an Intellivision.

 

So let me ask this, I have a CC3, need to make the serial cable, but once you have that, can you simply connect that serial cable to a modem and this program would be able to send AT commands to the modem like a regular terminal?

 

In theory, yes! The CC3 doesn't offer flow control, so you will have to use a conservative baud rate setting, but it ought to work. That's essentially what I did in the video above logging into my Linux box and using VI. :-)

 

In the example above, I was running at 9600 baud and it was able to keep up. I can't guarantee that would be true in all circumstances with the current code, but with some optimizations and tweaks I think you could make it so.

Edited by intvnut
  • Like 1
Link to comment
Share on other sites

I am not a technical person so I found difficult to follow what is going on in this post. After watching the video and reading the post I researched what does BBS mean. According to the wikipedia a BBS or Bulletin Board System allows to exchange data remotely via a modem. I am wondering if your project may allow to connect the Intellivision to the Internet and download games (similar to what the playcable did).

Nevertheless thank you for sharing and I apologise for my ignorance in this subject.

Link to comment
Share on other sites

I am not a technical person so I found difficult to follow what is going on in this post. After watching the video and reading the post I researched what does BBS mean. According to the wikipedia a BBS or Bulletin Board System allows to exchange data remotely via a modem. I am wondering if your project may allow to connect the Intellivision to the Internet and download games (similar to what the playcable did).

 

BBS's were in the 1980s and 1990s (and for some, beyond that) what online forums are today. You dial in to the BBS with your computer and some terminal software. The server at the other side then runs the show: It sends text to your PC. The terminal software renders it for display and accepts input that it forwards to the server. All the brains and interaction processing are on the server.

 

Online forums today are mostly just a modern rendition of what BBSes gave us all those years ago, just now with flashy graphics in a web browser. :-)

 

BBSes usually offered services like basic e-mail, chat rooms, message boards, file areas, and on-line games (typically called "doors"). The ones I played with were all text based, but often employed simple graphics, either using so-called "IBM ANSI graphics" (using the IBM extended ASCII set and some special 'escape codes'), or PETSCII (if you called into Commodore 64-oriented BBSes). (There were services such as CompuServe, GEnie, Prodigy, and the early America On-Line that had more advanced protocols. They aren't what I consider traditional BBSes.)

 

In all this, the terminal software was just an intermediary. The BBS sent text, escape codes, etc. and the terminal software turned that into a display through something called "terminal emulation". The terminal software also accepted your inputs and forwarded them to the BBS software for processing. If you decided to upload or download a file, the terminal software acted as an intermediary to copy the file from point A to point B, but otherwise didn't really do anything with the files itself.

 

In my video above, I demonstrated some really simple terminal software I wrote that was sufficient to log into my Linux box as a serial terminal. It emulates a VT-100 terminal with some extensions for ANSI color escape codes. That combination was essentially the "HTML" of its day. If I had BBS software running on my Linux box, I could have demonstrated what it might be like to dial into a BBS from an Intellivision. :-)

 

How would you dial into a BBS with that software? Most modems you're likely to encounter hook to a serial port, and accept simple commands to configure them and to ask them to dial out. (Look up the "Hayes AT command set" if you're curious.) Typical terminal software of the 90s (what I grew up with) knew how to speak the modem's command language and could configure the modem and dial out to BBSes for you. You could set up a phone book of BBSes, and even specialized settings if some BBSes needed them. (Who here remembers HST, MNP and other such dirty words of the 90s BBS era?)

 

But even without such sophistication, it's not hard to talk to a modem yourself if you want to. To dial a phone on a Hayes modem just requires telling it "Attention, dial using touch-tone this phone number: 555-3456", or specifically "ATDT 5553456". It'd dial, and if all goes well, you'd get a message like "CONNECT 9600" and you'd be online.

 

If you've ever watched the movie "War Games", it's a little like that, only without Ally Sheedy hovering over your shoulder, and without the text-to-speech voice reading the screen to you, and without a psychotic computer AI calling you back.

 

So, this software running on a CC3 would let you connect a modem and dial into a suitable BBS. You could have basic interactions on the BBS, although the Intellivision's 20x12 screen would probably get very painful very quickly. My terminal demo lacks IBM extended ASCII and PETSCII, so between that and the limited display size, I doubt any BBS doors would be usable. And then there's downloading: My terminal software doesn't have any facility for uploading or downloading files. Someone could implement that, but I haven't. And, with the CC3, I'm not sure where you'd upload files from or download files to.

 

Even if you could download files, I have not implemented a means to allow downloading games from a BBS or elsewhere for play. Really, if you want to download games from the Internet to play on a CC3, you do not need this software. Just use a web browser, download the file to your PC, and put it on a microSD for your CC3. You don't even need a serial cable.

 

 

I really hope that you can eventually will be able to re-release some of your amazing games.

 

Good luck with your projects and best wishes for 2014!

 

I am working on releasing another batch of Space Patrol. I know some folks don't believe me when I say that, but I am. I've also been working in the background helping folks like Elektronite bring titles to market. And, of course, there's Christmas Carol, which you should definitely order a copy of if you haven't already. :-)

 

I truly believe I'll have more time to work on Intellivision projects in 2014. This last year has been fairly brutal for me work-wise, but I think 2014 will be on a more even keel. I think 2013's crunch was worth it professionally, but I really would like to get some more hobby time in.

Edited by intvnut
  • Like 9
Link to comment
Share on other sites

 

I am working on releasing another batch of Space Patrol. I know some folks don't believe me when I say that, but I am. I've also been working in the background helping folks like Elektronite bring titles to market. And, of course, there's Christmas Carol, which you should definitely order a copy of if you haven't already. :-)

 

I truly believe I'll have more time to work on Intellivision projects in 2014. This last year has been fairly brutal for me work-wise, but I think 2014 will be on a more even keel. I think 2013's crunch was worth it professionally, but I really would like to get some more hobby time in.

 

Great news. I already ordered Xmas Carol. I am wondering if you are considering re-releasing 4-tris. I think that many people would be interested in playing Tetris in a pre-Tetris console.

 

Playing Tetris on the INTV is a small historical statement that shows how much the Intellivision was ahead of its time.

 

Moreover, and more importantly, the game seems to be fun.

 

Best wishes for 2014 may you have health and energy to fulfil all your personal and professional projects.

 

Cheers!

 

 

  • Like 1
Link to comment
Share on other sites

I truly believe I'll have more time to work on Intellivision projects in 2014. This last year has been fairly brutal for me work-wise, but I think 2014 will be on a more even keel. I think 2013's crunch was worth it professionally, but I really would like to get some more hobby time in.

I'm hoping that 2014 brings more hobby time for me, too. My Aquarius has been gathering dust long enough!

 

I'm just imagining here, but I wonder how feasible it would be to use the CC3 serial port to host a terminal; that is, to have an ASCII terminal with its own keyboard plugged directly into the CC3. I think it would be cool to have a terminal-based debugger running on the original hardware: one could link the debugger into the program and interact with it entirely through the terminal, leaving the Intellivision display intact during testing.

 

(Of course, Intellivision emulators probably have debugging tools which would make this totally unnecessary.)

Link to comment
Share on other sites

I wonder how feasible it would be to use the CC3 serial port to host a terminal; that is, if an 80-column serial ASCII terminal with its own keyboard could be plugged directly into the CC3. I think it would be cool to have a terminal-based debugger running on the original hardware: you could link it in and test your programs by interacting with the debugger through the terminal, leaving the Intellivision display intact.

 

It's actually much easier to use the CC3 to send debug information out, if you don't require full interaction. For example, if you just want to monitor the values of certain variables, you can add a call in your code to dump those variables out over serial and use some software to capture that on a PC.

 

If you want a full serial terminal experience, then you'd have to code all that on the Intellivision, and I have a feeling that that'd be too intrusive.

 

Years ago, I wrote a debug monitor as part of my ECScable work. (ECScable was an ECS to parallel port transport. It happened to work on the PC I had at the time, but I was violating all sorts of electrical specs, it turned out, so it didn't work on most peoples' machines, including my next PC.) I ported a good portion of that debug monitor logic into an experimental project called cc3_mon, but I don't think I ever productized it.

 

The ECScable debug monitor had two components: A basic runtime that let you download program images, provided they matched a certain memory map, and a call-back you could invoke from a main game loop that looked for monitor requests. With that setup, you could write simple tools to various actions such as:

  • Read memory
  • Write memory
  • Reset to monitor mode
  • Reset to game
  • Blank the display
  • Unblank the display

As I recall, the first three commands were always available, and the latter three commands were available only in monitor mode. The first three commands gave a basic inspection capability during a running game, and a basic ability to poke new values into a variable. The reset-to-monitor-mode command let you halt a currently running game.

 

The other commands let you poke around the Intellivision in an idle state. They were mainly useful for reading GROM, GRAM and certain other things.

 

In the end, none of it proved as useful as just using jzIntv's debugger to debug actual game issues. Mostly I used ECScable to download game images to my Intellicart. Once I got to the CC3, I never really used the functionality I ported from ECScable to cc3_mon for anything, which is probably why I never really completed that code base or productized it.

Link to comment
Share on other sites

Hooked up my Atari 800 to my Intellivision ECS with terminal, typed on the 800 and characters, not the right ones but characters, came out on the Intellivision.

 

Strangely cool to see a Atari 800 and Intellivision somewhat talking. :P

post-4709-0-86001800-1388718534_thumb.jpg

Link to comment
Share on other sites

I was overthinking this. :P

 

I was using a null modem connector when in fact this cable that they show in the CC3 manual is a direct link cable that is only confused by null modem connections.

 

So the terminal on one computer is able to talk to the ECS Terminal and you are able to talk the other direction.

 

Well cool. :P

post-4709-0-14187200-1388723411_thumb.jpg

  • Like 1
Link to comment
Share on other sites

BTW, for anyone wanting to play with this, the attached keyboard character mapping might be useful.

 

For the alphabetic keys, Shift and CTL do what you expect: Without shift, you get the lowercase character, with shift you get the uppercase character, and with CTL you get the control character. Probably the most important is CTL-H, which will give you "backspace" in most cases.

 

For the numeric keys and punctuation keys, there's three symbols. The lower symbol is the unshifted character. The upper left symbol is the shifted character. The upper right symbol is the character you get when pressing CTL. For example, 1 by itself gives you 1. Shift-1 gives you =. CTL-1 gives you ~.

 

In the current keyboard scanning code, CTL has no affect on the arrow keys. But shift, on the other hand, does. So, the symbol shown above the arrow is the symbol you get with shift.

 

Now, the observant among you might notice some strange things. Shift right-arrow gives you a /. I think it was meant to give an apostrophe, but the graphic on the keyboard sure doesn't look like an apostrophe. Also, there's two tildes on the board. (CTL-1 and CTL-8 ) I think I was running out of punctuation to fill in all the slots. :-)

 

Other oddities: The four arrow keys send ASCII codes 28, 29, 30 and 31 for up, down, left and right, respectively. I don't know a thing on the planet that expects those codes, so those keys are likely to be useless in an actual terminal environment. For true VT-100 emulation, these need to send longer sequences, such as ESC O A, ESC O B, etc. It wouldn't be that hard to add, I suppose, should folks actually start playing with this in any serious way.

 

 

EDIT: I just noticed a typo over the left arrow. Shift-Left-Arrow gives %. I've corrected the attachment.

post-14113-0-51467700-1388725244_thumb.png

Edited by intvnut
  • Like 2
Link to comment
Share on other sites

That is awesome stuff. As I said in PM thanks for all the time to elaborate on this. Having an Intellivision talk to another machine, even if it is just exchanging text back and forth is kinda cool. :D

 

Not sure if we will get the term program talking to a modem, but I'm still thinking.

 

In the meantime, I made a picture of the modified shell for my CC3. Made a hole on the side for ejecting the Micro SD card, and a hole in the front to connect the serial cable. They didn't have the 2.5 cables at Radio Shack so I bought the 2.5 to 3.5 adaptor and that is what you see sticking out and looking like a tank torrent. :)

 

Cartridge shell in the foreground is the alternate shell I put the CC3 in when traveling.

post-4709-0-83716000-1388727601_thumb.jpg

Edited by doctorclu
  • Like 2
Link to comment
Share on other sites

FWIW, here's my own CC3 setup. I got the right-angle 3/32" stereo headphone connector from Mouser.

 

Maybe I should consider selling CC3 cartridge shell kits at some point... The clear shell setup looks super cool in better lighting.

 

post-14113-0-51325700-1388728833_thumb.jpg

Edited by intvnut
  • Like 6
Link to comment
Share on other sites

In the meantime, I made a picture of the modified shell for my CC3. Made a hole on the side for ejecting the Micro SD card, and a hole in the front to connect the serial cable. They didn't have the 2.5 cables at Radio Shack so I bought the 2.5 to 3.5 adaptor and that is what you see sticking out and looking like a tank torrent. :)

 

FWIW, that adaptor does look badass in its own way. My other CC3 (yes, I have more than one) is in a gutted Astrosmash shell that otherwise looks very similar, minus the tank turret. ;-)

Edited by intvnut
  • Like 1
Link to comment
Share on other sites

The clear case is quite nice. How did you make it?

 

It's one of the custom cartridge shells I had made. My LTO releases and the Elektronite releases use these custom shells. Most are black, opaque plastic, but I had a small number of clear Lexan shells made with the same mold for special edition cartridges. They look really sharp.

  • Like 1
Link to comment
Share on other sites

 

It's one of the custom cartridge shells I had made. My LTO releases and the Elektronite releases use these custom shells. Most are black, opaque plastic, but I had a small number of clear Lexan shells made with the same mold for special edition cartridges. They look really sharp.

 

Looks like we had similar thoughts. I also have the same clear shell. The difference is that I've cut a hole for the microSD card but have not yet add a hold for the serial cable (yet).

Link to comment
Share on other sites

Good news everyone!! And unlike on Futurama where that is meant for something bad, this is actually something good. :) WE HAVE CONNECTION WITH AN INTELLIVISION AND A BBS!!

 

And I'm sure some are asking "What's a BBS", well, allow me to demonstrate...

 

http://youtu.be/Ui2vTuvzi34

 

Thank you InTVNut for writing this terminal program and giving a reason to use the serial port on the Cuttle Cart 3. :D

 

Made an adaptor to allow null modem with loop back handshaking. The information was found here:

 

http://www.lammertbies.nl/comm/info/RS-232_null_modem.html

 

And I used the 25 pin version of this, just a note, the pin 2 and pin 3 should switch, that was all that needs correcting to make this work:

 

http://www.pccompci.com/rs232-cable-technology.html

 

Here is what it looked like:

post-4709-0-03337400-1388863040_thumb.jpg

 

Here is what it looked like all hooked up to the CC3 serial cable and with a 9 pin to 25 pin adaptor to the modem:

 

post-4709-0-29955300-1388863159_thumb.jpg

 

And on the Prison Board BBS we like to log in with all kinds of retro computers and equipment. It was a awesome moment to post the following message from an INTELLIVISION ECS KEYBOARD! :D

 

post-4709-0-92963700-1388863226_thumb.png

 

Awesome stuff! Thanks again InTVNut, look forward to seeing how else we can refine this new use for an Intellivision. ;)

 

 

  • Like 2
Link to comment
Share on other sites

Here we go Oscar, Legend of the Red Dragon:

 

http://en.wikipedia.org/wiki/Legend_of_the_Red_Dragon

 

http://lord.lordlegacy.com/

 

A hit game in the 90's and really a simple game to play. Part of the fun of the game is the total lack of political correctness in the overall humor as you go out fighting monsters to get gold to get better weaponry and armor to slay the red dragon. And then when you kill the red dragon you start over.

 

Simple, fun, I have a autoscript playing it for me so my account doesn't fade off from lack of activity. ;)

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...