GUI
So far the entire interface for the project is just a terminal with some print statements and sometimes a display window
so I finally made some frontend GUI! 
stuff
The idea for this was a full window showing everything that the processor is currently doing, including the various subsystems and components of the emulated CPU, the registers, pins, settings and other stuff 

It also has a cool section for programming it, with which you can write code or import programs, assemble them, load them into the CPU and run them with only a few clicks. 

With the new GUI you also can modify everything in the CPU however you wish
so you can change register values (even the read only ones
), fire pins, change processor settings and other execution stuff, and also see and interact with the GUIs for devices! (gui inside gui
)
netbeans
believe it or not, netbeans, out of all IDEs, has an
amazing
form editor, which is basically a UI designing thing for java, and that’s what I used to make the UI for this.

All you have to do is drag and drop stuff into the canvas and try not to crash out over its idiotic paranoid auto scale system, and it automagically generates all the layout code for you!
if only it magically made all the UI work too 

See the design lapse here: https://lapse.hackclub.com/timelapse/j9cZMZqsB7Ia
flatlaf
uhh so the default GUI looks horrendous because it uses Java’s built in Swing UI elements and designs, which is fine, but it makes it look like its from 2009
BUT i can change it’s look using a different “Look and Feel”, which is basically defines how UI elements should look. and feel. 

For this project I decided to use the FlatLaf look and feel which made it look a lot more modern and also made it a bit nicer to use.
I didn’t use maven for this because I have trauma from when i used maven a long time ago and it uninstalled my entire project with no backups also java yum
making the ui work
this is the hard part

Okay now the UI looks nice and all but it does nothing and is useless because it’s not linked to the backend 

Anyway I wrote a lot of messy code and linked up the processor backend and the assembler to the UI, and also wired up all 28 registers, 8 pins and a bunch of settings, initialization and assembling stuff to the backend. ![]()

The thing is, I need to update the backend from the frontend and the frontend from the backend, and if that happens incorrectly or in the wrong order, which it does a lot, wrong or invalid information can be fed to the backend (and the frontend) which ruins the entire execution flow. ![]()

There were so many problems with the UI and backend not matching up, like:
- Sometimes the clock would say it started in the frontend but didn’t in the backend even though all signs say that it did
- Sometimes the program wouldn’t even be written to the memory properly because the memory settings were incorrect in the backend only
- Sometimes two clock threads would start ticking simultaneously, which misaligns the PC because it’s only supposed to be multiples of 3
and a lot of other bugs 

After consuming
all of the remaining bugs and testing it a lot, I finally had a UI that worked and synced with the backend properly… mostly.

This is a prototype and I still need to change a lot of stuff, but here’s a screenshot of the finished UI while executing the previous 3D renderer thing 

) but it’s so cool and really shows the capabilities of this tiny CPU 
Initialize the cube vertices
Rotate all the points of the cube by a set amount every frame using a lot of scary math
Draw all the lines of the cube and refresh the display
Repeat from step 3
on each of the points, with a rotation matrix thingy and magically rotation happens.
)

A colour GPU
Work in progress text renderer terminal thing
Power Management Thing™ so that programs can view and adjust the processors clock speed
It does a lot of math and loop stuff to figure out which color should be at which position. I wrote it in like 80 lines of assembly using the new assembler





(java peak
