SutherGPU Assembler




Transformation

Translation

Rotation

Matrix


Assembler Guide 📎

Greetings programmers! Welcome to this little assembler I made for the SutherGPU!
My name is Pacifiky, one of the creators of the Fem8 CPU, Color Burst PPU, and the SutherGPU.
So a bit of prerequisites...
The SutherGPU is a 16-bit (or half float) GPU so it has a bit of accuraccy errors, but it's fine for most static meshes.
As of v1.0, it can only drive a 64x64 screen so keep that in mind while creating models.
The model can be created centered on the origin because the circuit does have translation and transform matrix controls.
The coordiate system is normalized to screen height so 1 in both x and y will be equal to the height of the screen (64px).
Finally, the center of the screen is marked as the origin.
Also, if you're curious on what inspired the name, it was inspired by the computer graphis pioneer Ivan Sutherland. He created the first cad program "Sketchpad" and the first augmented reality headset (Sword of Damocles).

Controls 🎛

In the middle of the page is 1 text input on the left and 4 text inputs on the right.
The left input is the place where you will write your assembly and the 4 inputs on the right are the outputs.
The inputs on the right are ordered top to bottom, with the same layout as the VTable roms on the circuit.
Above this area, you will find two inputs. A button labeled "Run" and a dropdown labeled "None" Under these fields, you will find a "transformation" section.
These inputs basically transform the verticies that go to the gpu. Think of it as quick and simple way of editing a mesh.
The block to the top left controls the translation of the model ordered x, y,and z from top to bottom.
The block on the top right controls the rotation of the model. It's ordered the same as the translation block, x, y, and z from top to bottom. At the bottom you can select the units you're using to measure the angle!
Below these, there is a section holding a transformation matrix. Nothing really there to explain except you should look it up on google if you don't understand it.
And that's basically all you need to know to control the assembler!

Loading 💽

In order to load your code into the GPU, you must go into the VTable circuit, and load the hex in each of the outputs to their correlated ROM.
Hover overing each of the output fields shows which rom it should go into (check the name of the outputs of each rom).

Syntax 🏁

There are four types of "lexical elements". Here's an example of the syntax:
v 0.2 0.5 0.3 #This is a comment #This is another comment clr FFFF00 v 0.2 0.6 0.2 00FF00
You might've noticed I took a bit of inspiration from the obj file format.

Errors 🚫

If your code has problems, errors will show up in the X output field. It will tell you what the problem is and the line it ocurrs on!
Here's a few errors and what they mean:
Op Description
v [x] [y] [z] [clr]? Defines a vertex. X, Y, and Z are decimal numbers and clr is a 24-bit hex value. The clr arguement is optional.
clr [clr] Defines a color for next verticies. The clr is a 24-bit hex value.