One day I woke up and decided to challenge myself. So this project came to life, it's a short story but full of headaches. Don't expect much from this emulator, it's made just for learning purposes.
From version 1.0.0
this program creates one file named PEMU.config
in the user's home dir to save all config data.
From version 1.12.0
this program creates a folder named PEMU
in the user's home dir to store all program's data.
- Windows:
%USERPROFILE%/PEMU/
- Linux:
$HOME/PEMU/
This project is built using Adopt OpenJDK 8, though any newer JRE should be able to run this properly.
There are four main ways to run it:
- By downloading the jar file from Releases.
- By opening the project using IntelliJ IDEA and building the project's artifact.
- By opening the project using IntelliJ IDEA and creating a new Run Config:
- Java Version:
1.8
(Adopt OpenJDK) - Class Path:
Processor_Emulator.main
- Main Class:
io.github.hds.pemu.Main
- Java Version:
- By building the source with gradle. Pull the latest version from the repo and run
gradlew build
, the jar file should be located in./build/libs/PEMU-version.jar
.
PEMU Program Examples can be found in the examples folder.
Since version 1.10.0
added the #INCLUDE
Compiler Instruction (see docs) libraries became possible,
so I've made a Standard Library Which is separated
into modules (since Memory Management is so important) with all functions that I've found myself rewriting all the time.
You can download the above linked folder and start using it yourself to make your life much easier!
Can be found in the file DOCUMENTATION.md
On version 1.12.0
plugin support was added, and since then you can write your own implementation of a Processor using
the Ruby Programming Language (This added support also increased PEMU's size by ~25MB).
You can learn more about plugins in the plugins folder.
There's a VSCode Extension which currently adds Code Check (Through the "Verify PEMU Code" Command), Code Snippets, Syntax Highlighting (For PEMU Docs too!), Icons (Still waiting for VSCode to support extending other themes) and other utilities to be used with the PEMU Programming Language:
- https://marketplace.visualstudio.com/items?itemName=hds.pemu-language-extensions
- https://github.com/hds536jhmk/vscode-pemu-language
There are 2 main dependencies:
- JRuby (Used to add support for Plugins written in Ruby)
- JetBrains Annotations
The Main Window that contains the Debugging Console (the one on the bottom), and the Processor Console (where the processor can print to on the top) and other info/settings:
The Processor Config Panel where you can change your Processor's settings (Clock can be changed while the Processor's running):
The Memory View window where the Processor's Memory is shown to the user, this has also some visual settings: