Saturday, May 19, 2018

Gen 1: a retrospective

SBTCVM. Its hard to believe that mark 2 was first committed to GitHub over a year ago, but its true. In fact, SBTCVM has been in development for over 2 years. So, in light of Gen 1's codebase being retired, lets take a look at its history.


Just a quick look at Wikipedia.
The origin of mark 2 actually traces back to me going to look up something on Wikipedia, and getting lost in the maze of related articles until i stumbled across "balanced ternary".

calculations operational, sir.
On June 3rd 2016, A curious little python program poped up on github.
Its name, was BalTCalc of course. and as you might guess, its a calculator, that works in balanced ternary. This calculator needed some backend code, so i wrote libbaltcalc to go along with it. Little did i know, that one library would lead me to starting a certain project.

Demo ahoy!
September 24th 2016. I had been coding away at a rather alien project for myself, a virtual computer of sorts. TDA was just as its acronym suggests, Ternary, and a Demonstration of a computer Architecture. The code was buggy, slow, and didn't even have memory writes. but It did one thing: Show that i actually could simulate a balanced ternary computer in python, and prove libbaltcalc was indeed capable of such. Its worth noting, that what is now SBTCVM's assembler was begun partway through TDA's development because of me growing sick and tired of base 3 machine code programming.

Specs:
x6 729 word (6trit) memory banks (roughly 4KT)
x1 729 word IObus
4trit instruction set

SBTCVM is born
March 9th, 2017. SBTCVM Mark 1.1 didn't change too much of TDA's code, but it did have some important improvements, most notably address calculation in SBTCVM's assembler. Mark 1.1 was also a stepping stone for a much more capable VM.

19,683. 
March 17, 2017. SBTCVM Mark 2 makes its presence known.
with a whopping 162 KT of combined memory. (108KT of unbroken trytes) Mark 2 is vastly superior to the Mark 1.x machines, and a worthy holder of Gen 1's final form. It introduced features that made SBTCVM vastly more useful in studying balanced ternary computing.

For one, it was the first to include a graphical calculator, the first to include framebuffered graphics, and even the first to reproduce digital sampled audio. Mark 2's set of utilities did balloon out of control in hindsight, but now we know better what tools are actually needed. and what aren't. the calculator is always handy for a quick bit of calculation after all. and yes i still have 19,683 stuck in my head. :)

Specs:
162 KT of combined memory. (108KT of unbroken trytes)
27 KT of memory per bank (18KT of unbroken trytes per bank)
6 memory banks
1-trit mono and 3-trit RGB framebuffer graphics at 114x81 and 54x38
2 text modes
1-trit digital samples at 2 and 4 KHZ
3 voice square wave sound chip
hardware-thread-based multitasking
various conversion tools relating to the internal data formats.

In conclusion: 
I hope you enjoyed that short look back on SBTCVM's first generation codebase, as the SBTCVM project moves on to bigger and better things. 

SBTCVM Gen 2: on the road to alpha.

End of an era:
SBTCVM Mark 2 has been been in development for a while, and while Mark 2 has served the project well, and has taught the dev team some important things, its come to the point where Mark 2 has become too complex under the hood to make the jump to python 3 reasonably, and continue development in a orderly fashion.

Its with this, that I announce the official end-of-development for SBTCVM Mark 2, and its underlying "gen 1" codebase. Its replacement is currently being developed.

The future:
SBTCVM Generation 2 is slated to drasticly change not only how the VM works under the hood, and how its CPU works, but also how its used. With advanced features like SBTVDI, a virtual disk system and psudo-filesystem implementation that will work in tandem with a new subproject: SBTCVM DOS.

Some other features being explored are more advanced sound (like the digital sample system that was added to Mark 2 at the last minute), more interactive vm programs, and less cluttered, streamlined user interfaces. Thanks to the new modular codebase, plans exist for terminal-only, pygame, and a TK version when time allows. with the terminal version slated to be a subset of the more fleshed out TK and pygame versions.

Gen 2 is currently VERY early in development, so again, its hard to say what the exact details will be, or when it will be announced. That said, a "gen 2" status page can now be found on the blog (see the link bar above), and blog updates will be posted on major developments.

Wednesday, February 14, 2018

Documentation: new and improved helpview.

Helpview. v2.0.3's fast and easy help system just got a bit more helpful with a new search feature & glossary.

The search feature is accessed by entering keywords (separated by spaces) into the search box in the hud, then clicking the "search" button.

Helpview will search its pages and present a list of matching pages, and the number of matches on each.

But what about the glossary? well, you can read through it like a normal page, but you will probably find the integrated glossary results included in the search feature to be much more helpful.

Utilities - New Development aids: GUIasm & memory map views

GUIasm

For the longest time, the only way to run the assembler was by typing in a string of commands into a terminal.

Now when you open tasm files in fileview2 and fileman in run mode, GUIasm will open up and easily allow for repeat assembling with a mouse click, an automatically opening a log of assembler output upon errors. It can also be run from codeview as well.



Codeview enhancement: memory view.

When Opening troms and .dmp memory and iobus dumps in codeview, users will see a handy new memory view.

This view can be scrolled independently from the main view with w & s (or e & d for faster scrolling), or by scrolling over it with the mouse wheel. It even highlights faulty trits in red for easily knowing when somethings not quite right.


Sunday, October 15, 2017

SBTGA: SBTCVM's graphics adapter.


It happened.

SBTGA mode G0, 114x81 @ 3-trit RGB, (27 colors)
SBTCVM, for the longest time, has had no framebuffered displays. and while the 9x9 and 27x27 plotters have proved functional, the time has come.

SBTGA currently has a standby mode (default), and Graphics Mode 0 (G0, shown). While its indeed colorful, SBTGA has more features planned: such as formatted text modes, and a new, high-resolution plotter mode to replace the old 9x9 and 27x27 plotters that have proven quite useful.


Under the hood, SBTGA is SBTCVM's first complex IObus device, (unless you consider a basic psudo-random number generator or scratch memory, complex)
it works via a pointer address that points to a portion of Memory Bank A (the first memory bank), that tells SBTGA where its DMA-based framebuffer is. 

Naturally this lets programs have precomputed framebuffer memory ranges.In fact, this is the first job of the new MK2-GAT.py utility (GAT meaning Graphics Adapter Toolkit): To convert 114x81 binary images, to SBTGA Mode G0 framebuffer maps.

And while for the moment, SBTGA lacks even sprites, Its a definite start to a new chapter in SBTCVM's development.

The SBTCVM Desktop

SBTCVM's central launcher and its recently added "mini tools" are now much more:

Presenting a new and upcoming part of the SBTCVM suite: The SBTCVM desktop.

Featuring a multi-windowing enviornment, with resizable windows, additional applications as plugins, and powerful builtin utilities, along with integration with SBTCVM's powerful backend. Best part is, like the rest of the SBTCVM suite, its OS-agnostic, and very portable, and powered by python and pygame.



Builtin applications (often called SDAs, or SBTCVM Desktop Applications, for short) include:
  • Shell, a shell interface used to create a veriety of CLI interfaces, such as a System Shell (center) and a math shell (right)
  • taskman, manages the various tasks that are running. (top left)
  • fileman (not shown) a compact variant of the larger fileview.
  • and more on the way.
The Plugin system also provides some applications as SDAPs (SBTCVM Desktop Application Plugin)
  • The Math shell mentioned before is implemented as an SDAP, it features the same math functions as the command shell.
  • Scribble started as a mouse coordinate test and grew into a simplistic paint program (keyword: simplistic).
  • the scrolling credits shown is a port of the same code used in the credits window accessible via the VM's file menu.
  • as with the builtin SDAs, more SDAPs are in the works.
As mentioned in the recent, "new system of things" post, Themes are supported, and several are provided, along with various backgrounds.

Thursday, September 14, 2017

new system of things - how v2.0.3 is shaping up...

The VM

First and foremost, The VM has been redesigned, like the rest of v2.0.3, it features standardized UI elements, with support for themes...

notable enhancements are the new, mouse-ready menus at the top, and the enhanced post-VMSYSHALT mode, that tries to be more helpful than waiting for the user to press enter...


Launcher & the new mini-tools.


SBTCVM v2.0.3's launcher is a far cry from v2.0.2's it features a multi-window environment of smaller tools,
such as Scribble: a sketch tool that started as a test for mouse coordinates, and even SBTCVM's scrolling credits.

Like Several of v2.0.3's utilities, launcher has also been redesigned around a resizable UI, meaning you can resize the window as you wish. Other utilities with this feature include, helpview, imageview, & codeview/textview.






SBTCVM now has support for themes, and in select utilities, different backgrounds changeable on-the-fly.


SBTCVM's new dark theme, for those who prefer darker UIs...











Help!


SBTCVM now has a unified help system. called helpview, this nifty program offers quite a bit of it.











Fileview


The new Fileview program is far more useful than its v2.0.2 predecessor, featuring a redesigned UI, right-click menus, and even single, and dual pane view modes.






In Conclusion.


SBTCVM's other utilities, including the new calculator, all have been enhanced to match the new UI style, complete with drop-down menus, and theme support.

The release schedule for v2.0.3 is "when its done", but you are quite welcome to try out the latest code over on GitHub.  That aside, v2.0.3 already makes huge leaps in unifying SBTCVM's suite of utilities, as well as vastly improving the User interface side of things...

Stay tuned for more updates on SBTCVM v2.0.3!

Sunday, August 27, 2017

Utilities - calc

Overview

SBTCVM does have a command shell with mathematics functions, and a powerful integer mathematics backend, but for the longest time it hasn't included a graphical calculator. until now.

Presenting SBTCVM's newest utility: calc.py

It provides common operations like invert, mpi, mcv, the usual arithmetic operations like add, and some copy and swap operations, including the ability to either manually, or automatically copy the result to either or even both inputs.  It even features simultaneous decimal, and balanced ternary representation, with ability to enter and edit inputs in either form, with conversions handled automatically.


Friday, August 11, 2017

Developers Notes - Challenges in development

Developers Notes: A series of thoughts on SBTCVM's development.

Overview:
SBTCVM. Simple Balanced Ternary Computer Virtual Machine.

Its definitely not a simple project... while most VMs and emulators are based on existing hardware, SBTCVM isn't... its not even based on the same computer logic paradigm as the computers it runs on...

As you might guess, this poses many challenges in both developing the code, and also research into the obscure world of Balanced Ternary computers in general...

Those 3 simple values... Positive, Ground, and Negative... have a certain elegance to them...  and that basic idea of 3 balanced states is represented in SBTCVM's mascot:


The three ears and three eyes are more than a design choice, they symbolize the key difference balanced ternary has with binary. a balanced base three, instead of an unbalanced base two...

Deep meanings aside, it is definitely striking isn't it?


Balanced Ternary Is quite Obscure...  The SBTCVM dev team could just reverse engineer one of the many balanced ternary microprocessors right? no... Yes, I'm being sarcastic, Balanced Ternary is quite an obscure little base number, though it is at least, one with some solid footing... strewn through the history of computing, are various stories on people taking the plunge into the peculiar base number... From the Russian Setun computer, to Thomas Fowler's ternary calculating machine, to even modern-day projects, like balanced ternary adders, multiplexers, and of course, the SBTCVM project.

In the end, SBTCVM is less a new paradigm, and more, part of a rebirth of one.

So what Attracts people to balanced ternary? some say its boredom with binary, others say it is its simple elegant concepts, and others seem to have different reasons altogether...


SBTCVM:  Changing computing; 3 trits at a time.


Thursday, August 10, 2017

utilities - helpview

Background:

SBTCVM v2.0.2 has a rather patchy help system. the context help is plain text, and the tutorials were based on a modified point and click game engine.

The new system:

Like the old tutorial system, the new helpview system has multiple pages, and is XML based. key difference: helpview handles all the formatting details, and is resizable, and has a streamlined codebase and xml syntax, and is now fully integrated with the context help of the latest code.

and as you can see in the screenshots, its User interface adjusts to the size of the window.

It handles multi-line text, page links, and even images.



Monday, July 31, 2017

v2.0.2 stable is here!

SBTCVM Mark 2 v2.0.2 stable is now available for download!
after much work and development, its finally here. With a wide variety of additions over previous versions, SBTCVM mark 2 is looking good.


https://github.com/SBTCVM/SBTCVM-Mark-2/releases/tag/v2.0.2
Download: Zip Tar.gz




Sunday, July 30, 2017

V2.0.2 beta 0 is ready for testing!

SBTCVM has come a long way, and now v2.0.2 is nearly ready!

if you wish to help with testing, you can find the beta here:
https://github.com/SBTCVM/SBTCVM-Mark-2/releases

please report any bugs you find on github.