Thursday, April 30, 2020

New SSTNPL Module: segment

'plottertext' TROM showing segment in action.
The new segment SSTNPL module is an easy to use text renderer for SBTGA's plotter mode. its name comes from the 'segment-style' approach it uses for rendering text.


Features:
  • automatic newline support
  • built against the new SBTCVM Bi-directional buffer interface for printing text nearly as easily as SBTCVM's native TTY output.
  • fully customizable color, scaling, character spacing, and line spacing.
  • MUCH faster than drawing text using PLRLE tritmap images.

SBTCVM Bench: A single-taskng GUI for SBTCVM


basic 'desktop' layout.
SBTCVM Bench is a SBTVDI-disk based GUI for SBTCVM Gen2-9.


Its feature set is currently sparse, but it does have a lot of promise to be an interesting program.

It currently has about & credits screens, and a 'launcher' that loads up SBTCVM-DOS.

Expect more posts on this & SBTCVM-DOS in the coming months...

To run SBTCVM Bench, just type
run bench
in the XAS Shell (xas.py)

Wednesday, September 18, 2019

Monday, April 22, 2019

demoscene - Ternary Dreams - SBTCVM (6.5Khz ternary VM)







This demo is different from most in the 'demoscene' in that this is running in a 'Balanced ternary' Virtual Machine. as in, not 1 & 0, but +1, -1, & 0.





Program Size: ~2KiloNonets (2000 9-digit half-words)



Written in SSTNPL (a custom, label-goto-based language with stack-based subroutines.  With some in-line assembly. (a custom assembler is used.)



demo code: https://github.com/SBTCVM/SBTCVM-Gen2-9/tree/master/demos/ternarydreams (see *.stnp files for code)



Music data hand-written using SBTCVM Assembly 'raw' statements:

https://github.com/SBTCVM/SBTCVM-Gen2-9/blob/master/demos/ternarydreams/tdmusic0.tas0



uses SBTCVM's custom music engine:



https://github.com/SBTCVM/SBTCVM-Gen2-9/blob/master/vmsystem/r_standard_lib/musicengine.stnp



--- (emulated) Machine Specs ---



sound: 4-channel stereo waveform synthesis  (only 2 used in demo)



graphics: framebuffered 'vector plotter' can plot 600 lines/rectangles a second. 243x243 grid. NOT directly addressable.



Interrupts: none.



'Hardware' Timers: none



Clock speed: 6.5KHz (yes, you read that right! 6500 Hertz!)

Wednesday, February 27, 2019

video: Oncoming Trains v1.5 - a balnanced ternary 2-track dodge game.

Oncoming trains, a video game for SBTCVM and technically its first true video game.

v1.0 has been covered in a video before, though v1.5 offers vastly improved visuals. (relatively)

Thursday, February 21, 2019

Video: oncoming trains - a balanced ternary video game for SBTCVM.

A short Video featuring a new SBTCVM game: 'oncoming trains'.
On a Technical level, its SBTCVM's first graphical SBTGA game, and hence its first true video game.

It uses SBTGA mode 30: the vector plotter. that's why it looks so sparse, as the plotter can only do 3 drawing operations: fill screen,draw rectangle, and draw line.





Whether its the first true ternary video game in general, i don't know.







Sunday, January 6, 2019

Gen 2 App: cliclac now has a memory monitor

Memory monitors. computers have had memory monitors for quite some time, but until now SBTCVM has had to do without one.

Meet CliCalc Embedded Memory Monitor

CliCalc Embedded Memory Monitor In all its Glory.

Its fairly basic at the moment. only having single-address-at-a-time reads and writes, for the data, instruction, and IO buses respectively.

Possible improvements include dumping ranges of memory in a similar fashion to romdump.py  (Added), As well as possible disk support when time (and SBTVDI's development state) allows.

 

 Fun:


via 'L', you can write to the IObus. that may not sound like much, but that means you can do this:

  1. start clicalc from the xas.py shell (so you can still see the TTY output mirrored to the OS terminal's standard output)
  2. enter the memory monitor via  'p'
  3. 'L' command: address 500, value 30   :A grey screen should appear in place of the pygame window's emulated text screen.
  4. 'L' command: address 507, value 9490 :The screen should turn bright violet/purple
  5. 'L' command: address 500, value 0    :The tty should now be displayed again.

Friday, January 4, 2019

Developers Notes: Building for the future: looking on at 2019

Its hard to believe its been over 3 years since i started this project. It seems only yesterday that i was running the first tests on SBTCVM Gen2-9's memory framework.

       Its gone from a buggy, slow, mess of a python program, to a streamlined, 6.5Khz, modular VM, well suited to running things like calculators, games, and even mouse-driven programs via the pygame frontend.

Looking back on 2018

SSTNPL:

      Its hard to describe how much SSTNPL has helped coding for SBTCVM.  everything from the maze engine, to clicalc, to even many of the hardware demos. Its extensive TTY input and output integration, named integers, and its ever powerful 2D integer table system, this clever compiler has certainly helped along things...

SBTCVM Assembly v3:

      From its early beginnings in TDA mark 1, to its 9-trit rehash in Mark 2, to its Gen 2-9 rewrite, SBTCVM assembly has been not only the main compilation target for SBTCVM, but for a while, was its only language. While its direct use has dropped considerably since Mark 2, thanks to SSTNPL, its still a key component of SBTCVM's development pipeline, with SSTNPL not only compiling into SBTCVM assembly, but featuring support for its inclusion in-line.

      Not only that, the assembler is now the first SBTCVM language with a standard library. with tas0 files for statically linked routines and other bits of data, to .nsp files for namespace variables, which represent the new unified label/compile-time variable system. It even has header variables for controlling the compilation process in more detail.

eXstensible Assembly Script/Shell (XAS):

Despite the name, it does more than script the assembler. This program represents SBTCVM Gen2-9's platform independent build script system & interactive shell. Very handy for building projects with images converted to ternary-packed-art (block art) for example.

       It also has a few extra features in interactive mode. such as categorized command help, directory listing and a builtin find command for searching for that pesky file...

SBTCVM Gen2-9:

      This is among SBTCVM's greatest landmarks. Gen 2 marks the beginning of not only a new design of SBTCVM's codebase, but a new chapter, for at the very least, SBTCVM.  However, perhaps, balanced ternary will one day be more than a mere footnote in computer history, but a major player in computing, once again.

Looking on at 2019

Among the things being looked into just over the horizon, include quite a few topics..

New programming languages: 

      SBTCVM already has 2 goto-label based languages, (SSTNPL, SBTCVM assembly), but its apparent that a greater variety of languages are needed. While most ideas involve compiled languages, a few are floating about involving interpreted languages, and line editors. not much to show for either, particularly the latter. (eekee's scal for Mark 2, and my clicalc for Gen2-9, are kinda close, but in reality they are just 2 different calculators...) 

New Tools:

      As more features get added, and as clever programmers take up SBTCVM's challenges, you might just find a growing list of tools, converters, editors, and other nifty things.

New APPs:

      New Apps eh? like what? Well more games are almost a given, as both the mouse, and the plotter are yet to be exploited by them. and thats not even counting the tilemap graphics modes currently on the SBTGA drawing board.

      However, its also to be expected to find a verity of new tools for various things. they may not all be as fast, nor as polished as the external utilities tend to become, but the important part is whether they work isn't it?

Looking Forward

      Its with that, I wish everyone a happy new year, and hope not only SBTCVM's development, but your 2019 as well, goes great this year!

And who knows, perhaps one day, balanced ternary will be, perhaps, a bit less obscure than it is today...

Sunday, December 23, 2018

Developers Notes - A Mery New Year And A Happy Holidays - 2018

 Tis The season for many projects to
 leave holiday greetings on their blogs isn't it?

What then, does this blog offer?
 Well, take a look at some of the
fancy jolly footwork of SBTCVM's
 enhanced color terminal!

We start with an older text demo that
was spruced up with some clever 3-color
 block art wizardry and a nice green backdrop.


Here we find that our 3 eared
 mascot is hiding among the
 presents early Christmas morning.
 I wonder what he may find?

What do you spot in this 27-color 
25x81 splash of cheer?







Sunday, November 11, 2018

Gen 2 update: So many colors.

For the longest time, color was the domain of SBTCVM's old plotters and later, SBTGA. now the TTY has returned with a vengeance, in the pygame frontend.

View the dazzling 27-color 3-trit RGB color settings.







Yes! The packed art system has its own colors.  Nice isn't it?

Also, the default packed art colors have lost the blue tint, falling back to white grey and black.





More information: tty colors documentation

Saturday, November 10, 2018

Gen 2 Update: ternary-packed-art encoding

You may be wondering what ternary has to do with art? or what those two have to do with encoding things?

Well, take a look at the screenshot to the right. Notice anything... odd?

That's right! its a curses/log-friendly scheme for terminal block art. its only 3 shades but its 9x more efficient than text art.  The catch is: it can only output chunks of pixels 9 characters wide, and 1 character high. 

However, an automated, pygame-based conversion tool has been added to the newly created gfxcon.py utility.


To learn more, see: ternary-packed-art documentation on GitHub.

Friday, November 9, 2018

Gen 2 update: pygame frontend

Overview

SBTCVM, for the longest time, used pygame for its frontend.  From the first prototype, all the way to Gen 1's last major version: SBTCVM Mark 2

Gen 2, however, has taken a more flexible approach. Already having a curses frontend, with a second, tk-based, frontend in planning.

Now, pygame has returned with the recent completion of the TTY emulation, and the basic structure of the pygame frontend's code.

PYG_SBTCVM.py SBTCVM's Pygame frontend in TTY mode.
PYG_SBTCVM.py SBTCVM's Pygame frontend.

UI

Its UI is sparse, similar to other VM's and emulators with an SDL-based display, i.e. DOSBox.

In the window title, we see that 3 eared mascot again *1, along with the trom name, and of course, "SBTCVM Gen2-9".

At the moment, only SBTGA v2 mode 0 is supported. If your wondering what that is, its the same TTY the curses frontend emulates.  

When SBTGA does start getting implemented though, expect the window to adjust its size periodically.

Footnotes:
  1. You can find that icon, in its assorted sizes in VMSYSTEM/GFX