Slow Progress


I know Senbir's looked kinda dead the past two months or so, but it's not all bad news, gloom, and doom.  While I haven't been mucking around with the TC-06 much lately, nor the RISC-06, I haven't been completely useless.  (Just mostly useless.  Warframe's too bloody addictive.  >_<)


While working on a personal sideproject that may or may not ever see the light of day (probably the latter), I started working on an upgraded Assembler for the TC-06 using the new Unity UI system that was heavily pushed with the release of 5.0.  This means it performs better, looks nicer, scales much better for high-res monitors (like Macbooks w/ Retina displays, on which the original was nigh-on unreadably tiny), and perhaps most useful for quality-of-life, the formatting has been greatly improved with automatic syntax highlighting, non-explosive whitespace, and even labels, in the case of the YAPA-02.


That leads me directly to the next thing, and perhaps the far more exciting one: the YAPA-02 - aka, "Yet Another Processor Architecture".  It's the latest TC-06alike VM setup, but designed from the ground up to function more like a RISC or 6502 processor.  Variable length operations, selectable addressing modes, and most excitingly: a C++-based implementation that functions with Unity, enabling with (very relative) stability clockspeeds of at least up to 1 megahertz - the same speed as a stock Commodore 64's 6502 processor, and some ~16666.6x times faster than the default TC-06 in Senbir.

In its current state, it also uses a slightly-more-advanced memory system that has the monitor data stored directly in program-accessible RAM, so instead of needing to SETDATA a pixel, you just copy data into its associated RAM location.  In this case, it's literally just that the R,G,B values for each pixel are stored in the same RAM as the computer, in a 1D array at the start of RAM, but down the line I plan to add a distinct VRam that can be paged in and out, once the page system is actually...done.

All that said: a much more sane architecture, plus decent processing speeds, and an upgraded Assembler?  Writing code has never felt more natural.  While the original TC-06 setup in Senbir is by no means bad, I never got quite so into the flow of programming as I have while working with the YAPA-02.  There are flaws, of course, mainly due to the nature of the implementation (C++ being called via interop features apparently has no managed error collection, nor means of saving the program if something segfaults, meaning Unity has crashed plenty of times when my Assembly goes wrong, or when the VM has an accident), but that gif provides a pretty good sample of what it can do.

It's not just your average Blinkenlights or image-rendering program that's running there - it's a bona-fide text rendering & string manipulation system, written from scratch in YAPA-02 Assembly.  It supports many standard ASCII characters (all letters, plus a number of symbols, like the underscore you see flashing in the gif), can render individual characters, null-terminated strings (including working newlines!), and right now, is in the process of being upgraded as the basis for a TTY with the addition of other string manipulation functions, like a string-copy, concatenation, and other good stuff like that.  I'm cautiously optimistic I'll have a working terminal you can type & run commands in before the new year, though I'm not 100% on that, and it's almost certain you fine people won't be able to play with it 'till 2019 arrives in earnest, unfortunately.

Still, one can dream of what it might one day look like, in all its vaguely-*nix-y glory:

Q: That's great and all, but what does that mean for us?

A: Well, given that the VM code is platform independent (as long as you can pass pointers & call a C++ function, it'll chug away just fine), and almost none of the actual computer code is relying exclusively on parts from the personal project, porting the YAPA-02 to Senbir should be a breeze.  Ditto for the Assembler - all it cares about is access to computers, and it'll be easy enough to re-jig the current selection system to work on the new setup.  I'm not willing to make any promises as far as release date goes, given the aforementioned distractions, but the library itself, plus updated documentation w/ the YAPA-02 operation list & Assembler quirks/documentation is up on the Gitlab.  You're free to play around with it, but the old adage of "YMMV" holds true here - there ARE segfault-inducing glitches in the library, unimplemented features, and general stupidity that's probably not well documented.

If you don't care for the YAPA and are just here for the classical TC-06, well, there's good news in store for you, too.  The new Assembler will still make your life a whole lot easier when working on TC-06 code ingame, and if you're a Linuxite (or somehow have GTK working in Windows), there'll be a GTK language formatter stylesheet thingy available for you to use soon - it won't be hard to replace the op-code list from the YAPA-02 one to make a perfectly-functional TC-06 one.  The addition of any working native library also means improvements to TC-06 performance down the line when we get around to porting it to a YAPA-style native library, in addition to the ability to have a non-Senbir IDE/VM, probably to be rolled into the RISC-06 IDE, since it works nice and looks good.

Q: What's that mean for now?

For now?  Go play some Zachtronics games to scratch that Assembly itch (I strongly recommend Exapunks, its in-world zines as instruction manuals is something I really badly want to do for Senbir down the line and the worldbuilding is excellent.  Shenzhen I/O is great too, but the physical-component aspect of its puzzles can be a bit aggravating to deal with.  I haven't yet tried the TIS-100, but I think I need to, considering how much Senbir unintentionally wound up replicating it.) - and, outside of that, enjoy the holiday season, if you've a holiday season to enjoy!  If you've any inquiries or comments in regards to this post, or Senbir in general, hit me up in the forums, or in the comments section of this post.

All that being said: thanks for reading, and I'll have more words for you all...whenever next time is?

Get Senbir

Leave a comment

Log in with itch.io to leave a comment.