stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

12h 0m 49s logged

GUI :eyes_wtf:

So far the entire interface for the project is just a terminal with some print statements and sometimes a display window :pensive-wobble-fast: so I finally made some frontend GUI! :yay:

stuff :converge:

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 :yesyes:
:actually-nothing:
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. :yeah:
:actually-nothing:
With the new GUI you also can modify everything in the CPU however you wish :scheme: so you can change register values (even the read only ones :thumbs-up: ), fire pins, change processor settings and other execution stuff, and also see and interact with the GUIs for devices! (gui inside gui :omgg: )

netbeans :nether_portal:

believe it or not, netbeans, out of all IDEs, has an :stardance_star_purple: amazing :stardance_star: form editor, which is basically a UI designing thing for java, and that’s what I used to make the UI for this.
:actually-nothing:
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! :yayayayayay: if only it magically made all the UI work too :thinkies:
:actually-nothing:

See the design lapse here: https://lapse.hackclub.com/timelapse/j9cZMZqsB7Ia

flatlaf :scared-hamster:

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 :ohbrother: BUT i can change it’s look using a different “Look and Feel”, which is basically defines how UI elements should look. and feel. :skulk:
:actually-nothing:
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 :ohbrother: :angy: :cryin: :explode:

this is the hard part
:actually-nothing:
Okay now the UI looks nice and all but it does nothing and is useless because it’s not linked to the backend :shrug-1:
:actually-nothing:
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. :thumbs-up:
:actually-nothing:
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. :thumbdown:
:actually-nothing:
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 :lying_face-hole:
  • Sometimes the program wouldn’t even be written to the memory properly because the memory settings were incorrect in the backend only :what-nobg:
  • Sometimes two clock threads would start ticking simultaneously, which misaligns the PC because it’s only supposed to be multiples of 3 :uhoh:

and a lot of other bugs :cryin:
:actually-nothing:
After consuming :eating: all of the remaining bugs and testing it a lot, I finally had a UI that worked and synced with the backend properly… mostly.
:actually-nothing:
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 :yayayayayay:

0
22

Comments 0

No comments yet. Be the first!