New ConsoleWrapper version released!

Posted on

ConsoleWrapper has had another large overhaul over the last few weeks.

  • The primary focus of the release has been creating an internal shell which will serve as a base for growing and improving ConsoleWrapper in the future. This internal shell supports a number of simple commands (with more to come!), and passes on anything it doesn’t understand to CMD.EXE.
  • For now the only internally understood commands are EXIT and CD. This will likely expand in future (more about that below) — but for now even these two commands say a lot about the improved state of the shell. Firstly, because the internal shell (and not CMD) is watching for an EXIT command, we can run and exit a number of CMDs from within one instance of the internal shell. Secondly, the fact that we have CD represented internally hints at a very important improvement; the current directory is stored and managed by ConsoleWrapper! (And not CMD). This is important, for the following reasons:
    • Directory state can be preserved across different instances of CMD (e.g. when Ctrl+C is pressed — ConsoleWrapper simply tells any new CMD it launches, what the current directory is).
    • This will form the basis for tab completion. As I have been unable to pass TAB keystrokes to CMD, this has to be done internally by ConsoleWrapper — and knowing/changing the current directory is key to this.
  • As hinted above, having an internal shell will allow for more complex features than simple tab completion. The shell already has the (currently not utilised) ability to store and track multiple running processes built right in. This will form the basis for a screen-esque capability (if you’ve ever used a Linux shell) — however ConsoleWrapper has the distinct advantage of being a 3D environment, potentially allowing for some clever transitions and ways of visualising multiple active consoles.
  • Known limitations of this release include:
    • STILL no TAB completion! It’s coming soon, I promise!
    • The shell doesn’t recognise commands such as e: to change drives. Use cd e: instead. Note that if, for example, you’re browsing a folder in C:, you can use CD to jump straight to a folder in another drive, e.g. cd e:\test. Incidentally, you can’t use cd in that way with the standard Windows shell! You have to do it in two parts — e:, cd \test. The Windows shell tracks the “active” directory for each drive instead, and won’t change drives unless you explicitly tell it to with a command such as e:. Play round with it. I’m not sure which is better.
  • Here are two things I want to add very soon. Neither of them are particularly straightforward though, so I’ll see how I get on…
    • TAB completion!!!
    • I want to completely rework the graphics pipeline so that it uses letter sprites instead of rendering strings on the fly. This will be important as more gets added into ConsoleWrapper (in terms of multiple consoles etc), and should stop the video stuttering seen when large swathes are text are generated. (Try running DIR on a large directory, for example. Then try resetting the device — resizing the window will do it — then hitting Ctrl+Home to scroll over the text you just created).

Download the new release here!