About

prototype memory monitor

Overview:



SBTCVM, or Simple Balanced Ternary Computer Virtual Machine, is a project focused on providing virtual machines based around balanced ternary computers.

Whats balanced ternary? Well, its not something that can be explained in a simple paragraph, but in a sense, instead of 0 or 1 (as in binary), balanced
ternary has 1, 0, and -1.

SBTCVM, like any balanced ternary computer, has a few key differences from binary:
  • All values are signed inherently.
  • negative comes before zero. this is the case for everything from counting, to addresses, to color palettes.
  • the number of combinations in a length of trits (MCV) is DIFFERENT from its maximum value (MPI). i.e. 3 trits has 27 combinations, but can store values from -13 to +13.
  • a given length of trits has a wider combination range than a length of bits. i.e.:
  • 8 bits = 256 possibilities, 8 trits = 6561 possibilities.
Note: 'trit' is the ternary equivalent of the binary 'bit'. i.e. a single ternary digit.

 
Tierce The cat - The SBTCVM Project mascot.

 

So what do I do with it?

Oncoming Trains -a plotter game

Well, there's a number of things you can do with it. Ranging from writing technical programs, simple applications, games, or just messing around with the bundled applications.

You don't even need to really know a lot about balanced ternary.  SSTNPL, a fairly static, goto-label based Programming language, can easily accept decimal values in place of ternary, And even the assembler has decimal support.



SBTGSH - mouse-driven shell with terminal graphics.


SBTCVM may not be the speed of most emulators, but that doesn't mean its not capable of some interesting things. Take the screenshot to the right for example.

   



Example of the 27-forground/background colors.
It shows off what SBTCVM's dumb terminal can do with its packed-art encoding (efficient block-art encoding scheme) and its 27 foreground and 27 background colors.


Do note, a more enhanced terminal mode with proper cursor movement is on the drawing board.

Features:

These features are from SBTCVM Gen2-9. a full list of builtin APPS and tools, can be found at:
SBTCVM Apps & Utilities.
  • SBTCVM Assembly v3 (g2asm): Advanced, bare-metal, listing-style assembler, with automatic address calculations, compile-time variables, and a standard library, provides finite control over the VM's architecture.  More Info (guide)
  • SSTNPL: A higher level, static, subroutine-based, language, with integers, tables (2D arrays), iterators, and a wide range of input output Capability. It even has embedded assembly support, and last but not least: a module system, complete with namespace grouping. i.e. (somemodule.somevar)  More Info (guide)
  • 6.5KHz Virtual CPU with 18-trit words, split into 2 9-trit instruction & data words.
  • 3.25Khz Coprocessor that is identical to the main CPU.
  • 19,683 words of RAM (9-trit memory bus, 18-trit words (see CPU spec. above)
  • IO bus (9 trits wide)
  • 4-voice polyphonic stereo sound (think chiptune)
  • Serial Terminal input and output emulation. Enhanced color features and block art functions available.
  • Vector Plotter Provides clean, sharp, Geometric, drawing with 19,683 colors. (not supported in curses frontend)
  • Mouse Support Allows for more intuitive UIs in the future. (all implemented SBTGA modes support this) (not supported in curses frontend)

Programming achievements

  • PLRLE Plotter tritmap format and software decompressor/renderer: This may be one of, if not the first, implementation of a proper compressed ternary tritmap image format. (see screenshot that says 'test tritmap 1')
  • SBTCVM SIMPLE MUSIC ENGINE (musicengine): A proper music playback system, with 1-level 'subroutine' support for implementing patterns. supports all of the sound chip's functionality. easily embedded into program loops. (see 'musicdemo' in 'demos' for a demonstration.)

 

 

Gallery:



Here SBTGA mode 30: vector plotter mode, has been started from the same prototype memory monitor in the screenshot above.









Here's a simple integer calculator, [clicalc] which contains the prototype memory monitor.


No comments:

Post a Comment