03:00 pm - Well that'll teach me to implement the spec instead of building test-cases first...
Okay, I have a BlackBerry. 320x240 screen, works pretty good for SSH and all that with an LCD-aware bitmap 4x7 font. MidpSSH, works on any phone that can run Java, blah, blah. Problem with that? It's designed to work on any phone from my last 96x64 screen Nokia up to 640x480 smartphones. So it's universal, which means it doesn't take advantage of any newer abilities really.
So I'm stuck paging through menus, and can't use the trackball like arrow keys, or the volume buttons like page up/down like I'd immediately think I should. And whenever I connect somewhere, I have to actively go into a menu and pick 'type' before I can start actually typing commands, despite having a full QWERTY keyboard on my phone.
And... well, it's emulating a vt320 terminal, rather extensively in fact, so it's slow
from all the useless cruft it's trying to emulate that... well, I can't even find anything to test the vt320 capabilities. I just want a cell-phone OpenSSH client, in effect. Thankfully, it's open source. Unfortunately, it's Java. I think I've gotten the BlackBerry SDK working, just trying to import the MidpSSH project from the source-files on the developer's website.
But... that ends up in a detour. The largest problem with the vt320 emulation is that it's this truly massive hodge-podge of vector and text abilities, and this poor Java applet is trying it's best to emulate all this crap. So... I start from scratch, making steps from the get-go to minimize memory read/writes, and pull up the ANSI escape code spec-sheet. Huh... this isn't too complicated, implement most of it... have to deal with various issues since I implemented the screen as a rotating ring-buffer of lines, nothing very complicated here.
Then I start testing it against the output of various Linux applications. Nano, lynx, links, they all work near as I can tell. As do various ANSI animations, aside from the color-system not being implemented yet. So then I start building test-cases for the color-codes, to vet them against my intended target: The Linux console. One typo later in a test-case, and I end up on a side-road finding out something: The Linux console doesn't implement most of the ANSI escape codes dealing with scrolling, only screen-clearing.
Suddenly the code that was the most complicated to even get working in my implementation just goes out the window. *laughs* But, scrolling the screen one line at a time now only takes one increment, one compare, one possible subtract, one multiple, and two writes. So... I'll live. Now to wire that test code up to the MidpSSH...2 comments