Giter Site home page Giter Site logo

sbtcvm / sbtcvm-mark-2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thomasthespacefox/sbtcvm-mark-2

14.0 14.0 5.0 20.83 MB

[no longer supported, please see SBTCVM-Gen2-9] Simple Balanced Ternary Computer Virtual Machine: Mark 2 is a simple Balanced Ternary VM programmed in python and Pygame.

Home Page: https://sbtcvm.blogspot.com/

License: GNU General Public License v3.0

Python 100.00%
balanced-ternary pygame python ternary ternary-computer virtual virtual-machine vm

sbtcvm-mark-2's People

Contributors

eekee avatar thomasthespacefox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sbtcvm-mark-2's Issues

help view: word wrap not right

i opened help by launcher menu->help. on that page, visible without scrolling or resizing the window, a line of text goes off the right side of the window.

"resizable windows have an extra bar at the bottom, that is the same color of the title ba"

the right side of the 'a' is cut off. further down, the "Close Task" line is a little bit cut off, and the "Bring To Top" line's period is off the edge.

image

one thing i've learned over the years is you can't really precompute text size for most types of interface. You can't rely on how it will be rendered.

Failure to start with Python 3.6.3

Neither launcher.py nor SBTCVM_MK2.py will start with Python 3.6.3. I assume others also won't, as it's a syntax error in using print:

(SBTCVM-Mark-2-master) 55 % python SBTCVM_MK2.py
  File "SBTCVM_MK2.py", line 18
    print "SBTCVM Mark 2 Starting up..."
                                       ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("SBTCVM Mark 2 Starting up...")?
(SBTCVM-Mark-2-master) 56 % python launcher.py
  File "launcher.py", line 22
    print "SBTCVM Desktop v3.0"
                              ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("SBTCVM Desktop v3.0")?
(SBTCVM-Mark-2-master) 57 % python launcher.py
  File "launcher.py", line 22
    print "SBTCVM Desktop v3.0"
                              ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("SBTCVM Desktop v3.0")?

Sorry to do this, I loathe dealing with upgrade issues myself, but with Python 3.0 having been released 10 years ago, I thought I ought to at least file it. I'll install Python 2.7 for now, not expecting you to fix it overnight. :)

redesigning intro.tasm

The current introduction program is rather old. infact parts of it trace back to mark 1. and due to recent enhancements to the VM, just doesn't show all what mark 2 can do and what SBTCVM is as well as it used to.
here is a draft for a possible splash screen. (upscaled a bit)
splash1g3-resized

@SBTCVM/core-devs feel free to suggest ideas. we can use several troms if really needed.

also it be nice to take advantage of SBTGA and the 3-voice sound as well.
even though SBTGA's sprite support is awaiting design & implementation, it should still help to make the introduction a tad bit less dull.

My program crashed the VM

I broke it with my first program!

Hahahaha oh dear! Github "doesn't support" attaching .tasm or .trom... or seemingly any source code. What is this I don't even! Aaaanyway, pasting the tasm since it's so short:

setreg1|--------+|overloop
# label could go on next statement, but if it loops wrong i want to see it.

setreg2|+--------
dumpreg1|0|leftloop
multiply|3
wait|-
gotodataif|>nextloop
gotodata|>leftloop

setreg2|--------+|nextloop
dumpreg1|0|rightloop
divide|3
wait|-
gotodataif|>overloop
gotodata|>rightloop

It assembled with no errors, reporting 4 gotorefs, 13 instructions, and extra space: 19670.

On running it, the VM window opens, then soon closes. Here is the console output:
image

Since I laughed at Github earlier, I'll say I'm happy to see I can attach a screenshot with print screen and ctrl-V.

They say you don't really find the bugs in your code until someone else uses it. :)

Addons. creating a coherent way of having additional utilities. (before we wind up with a mess)

Basic idea:

The idea would be having a "addons" directory, and having each add-on having its own directory under that. (that way we can ignore them with the .gitignore file) and having a basic way for programs to "register" command shell commands and launcher icons, and perhaps when we get around to it, file types in the fileviewer.

The Idea for the user is that these additional utilities should work in a seamless fashion.

the tricky part would be having to run said python programs from the base directory of the repository so they could access the backend and files and whatnot correctly.

This might also help with components not necessarily needed by all users, or components that involve C or some other compiled language.

as far as addon configuration, XML would be a logical choice.

though, this can (and probably should) wait until after v2.0.3. Because we should do this right the first time and not rush this.

Though we should also not wait until we have a mess of disorganized addons.

@SBTCVM/core-devs

The VM currently does not have any ways of accessing helpview.

It probably would help lessen confusion if we put a helpview section together for the VM, and provided a way to access such from the VM.

Question is, Do we have it accessible via the pause menu, F1, or have a detailed index of related topics accessible via the pause menu, and a short, quick reference accessible via F1?

offsetlen queries

Documentation for the offsetlen instruction left me unsure whether it shifts the source data or not. testoffsetlen.tasm was uninstructive as its test data is uniform. I assumed it shifts because of the "offset" in the name, but output from my tests seems to indicate it truncates. I'm wondering, is it meant to shift, or shall I correct the documentation?

here's my intended documentation:

"offsetlen"
-0-++0
defines a masking window, only trits visible 
through the window are written to the destination.

usage:
	offsetlen|A,B,C
if A is "off", the remaining trits in the destination are preserved.
if it is "on", they are overwritten with 0.
B is the offset for the window's low-value edge (the right side).
C is the size of the window, the length extending toward high values.
affected operations are read and write to IO and memory.
the window remains active until reset with "offsetlen|off,0,9".
see also: romread* setdata IOread* IOwrite*

test code:
https://github.com/eekee/SBCTVM_Mk2_VMUSER/blob/master/offsetlen.tasm
https://github.com/eekee/SBCTVM_Mk2_VMUSER/blob/master/offsetlen.tasm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.