Recently I've been working on a VT100 emulator for the CE. I've connected it to my computer using my serial library and two serial adapters to record the above demo. Currently, it can take user input of letters, numbers, symbols, arrow keys, "ctrl" keys (e.g. ^C), and the delete key, send said data to a serial device, receive data from a serial device, print ASCII characters, and parse ESC and CSI escape sequences and handle the most commonly used ones.
I still need to implement the remaining CSI sequences, handle the G0 and G1 character sets properly, support graphics attributes / colors, add proper cursors, and add a way to input the Tab and Backspace keys, as well as some other stuff I'm probably forgetting.

The code is available on my GitHub, though it won't work properly without a fix that I made for usbdrvce which I will add to the toolchain soon.
I am DrDnar and I approve of this use of FontLibC.
Nice work! Keep it up
Telnet83 rides again!

This seems useful to the point that I might actually consider using it if I needed a portable terminal emulator (if I owned a CE Razz).
I've been putting off posting in this thread, but I have to say that it is looking pretty polished so far. I wonder what the speed would be like if you tried something like this:

Keep up the nice work! Glad to see that the usbdrvce libraries are working well (kudos to jacobly!)
I've implemented 256-color mode.

A few other SGR attributes such as bold and underline are tracked, but only foreground and background color, bold text, and inverse graphics currently work.
I also have some code to convert 24-bit true color to the nearest 24-value greyscale or 216-value RGB color as appropriate, though it's not working at the moment.

After finishing that, I plan on improving the documentation, cleaning up the code, implementing a few more common CSI sequences, then fixing srldrvce to automatically detect device type (currently it assumes everything is a FTDI232).

I also should probably include a menu to allow you to change settings rather than having them baked in at compile-time or loaded from an appvar that has no editor of any kind. I really don't feel like doing this at the moment, so if anyone would be interested in helping with that please let me know.

I've also added an echo mode that takes all input and loops it back to the terminal. You can enter escape sequences in this mode if you really want to by pressing F1 and [ at the same time, when 2nd mode but not alpha mode is on.

I've also included a font called TomThumb that's 4px wide, though because of the aforementioned lack of a functional menu it is hard to switch to. You can switch to it by changing the default font pack name and then deleting the settings appvar, or editing the settings appvar using an ICE program or an editor on a computer. The main benefit of a 4px-wide font is that you can fit all of the VT100's 80 columns on-screen at the same time, which improves compatibility. The downside is that the font is a bit hard to read, as it is monochrome and only 6 pixels tall.
Whoa!! so your telling me that you connected you calc to your pc. and you can use linux based terminal on it!!

does it actual get the computer username and type of computer? hopeful it can run gui application later on.
I've still been working on this occasionally, I just haven't really added any features individually significant enough to warrant a post since then.

I've fixed several of the issues with srldrvce that made the terminal not particularly useful, and it now should properly support Windows and a few device types without crashing.

Back in January of last year, I switched everything to redraw every frame. This made things like partial scrolling significantly easier to implement but made the terminal significantly less responsive. A few days ago I ditched that and switched to a system where I move the LCD base around VRAM to scroll the display. This means that scrolling is almost instant, except when I run out of VRAM and have to move everything on screen back to the top. I tried using hardware scrolling to avoid this copy, but because the LCD is sideways, the vertical scrolling is actually horizontal.

Moving the LCD base around is extremely fast compared to the old methods - it was able to display /usr/share/dict/words, which contains 102401 lines and 972398 bytes, in 344 seconds, for about 298 lines or 2826 characters per second.

I was able to use the hardware cursor to invert the character the cursor is over, which is pretty neat but unfortunately doesn't show up properly in the CEmu version I'm using. This makes it easy for me to efficiently blink the cursor without having to worry about drawing and undrawing it.

I added a keyboard shortcut (F1 + F2) to send a stty command with the correct number of rows and columns.

I also did the usual refactoring, and it now builds with convimg instead of convpng. At least, it would, if there weren't a bug in the current version of convimg that prevents the palette from being read.

Since I guess I missed this when it was originally posted, I might as well necro-reply:
Alvajoy123 wrote:
Whoa!! so your telling me that you connected you calc to your pc. and you can use linux based terminal on it!!

does it actual get the computer username and type of computer? hopeful it can run gui application later on.

This project is a terminal emulator, which basically means that it reads data from serial and displays it to a user, and reads user input to send to serial. The "linux based terminal" you're referring to is actually the bash shell, which is running on the computer, not the calculator. Normally, when you open a terminal on a Linux computer, you're starting a terminal emulator, which is connected via a virtual serial device to a bash process. In this case, though, it's using an actual serial device instead, which is connected to Terminal CE.

So, it really doesn't do anything but display data a computer sends to it. If you connect it to a Windows computer, you'll get a cmd shell; if you connect it to Linux computer, you get a bash shell. If you connect it to an Arduino, you'll get whatever the Arduino sends to the serial port; if you connect it to the serial monitor in the Arduino IDE, it will display whatever you send. It doesn't get the username and type of computer - it's just displaying the text that bash sent to it, which (as I have it configured) happens to include the username and hostname.

While it would be neat to run GUI applications, that's not really what a terminal emulator is. I'm sure you could set up an X server or a client for some sort of remote desktop protocol using usbdrvce, but that would be an entirely separate project.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum