This program is a simulator for the ICMC architecture. It features several upgraded functionalities compared to the C++ simulator, including:
- A resizable window and fullscreen capability.
- An instruction scroll to view all instructions and data being modified in real-time.
- Ability to edit the stack pointer and program counter directly.
- Enhanced error handling: the simulator will halt and indicate errors to the programmer.
- Improved parsing of MIF files, adhering strictly to syntax definition and providing detailed error messages.
- Capability to change character mapping MIF during runtime (without resetting).
- Shortcuts that do not rely on keys that may not be present on laptop keyboards (e.g., insert, home, and end keys).
- Support for Windows, macOS, and Linux.
If you prefer not to compile anything, you can download a precompiled binary for your system from the releases page.
To get started, add a program to run and test it. You can specify MIF files in the ICMC architecture format in the command line or use the file -> open code/char MIF menu. Always specify a char MIF to ensure proper output of characters.
- Install a recent version of Go (at least 1.13) from here.
- Install Git and a C compiler (on Windows, use MinGW).
- On Debian/Ubuntu-based systems, install
libgl1-mesa-dev xorg-dev
; on Fedora and Red Hat-based systems, installlibX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel libXi-devel libXxf86vm-devel
. - Clone the repository and navigate to the project directory.
- Run
go build .
to compile and./goICMCsim
to start an empty processor. Use--help
to see command line options. - Optionally, you can install directly into
$GOPATH/bin
withgo install github.com/lucasgpulcinelli/goICMCsim@latest
.
To add or modify instructions:
- Choose an opcode for your instruction.
- Add it to the constants list in
processor/Instruction.go
. - Add your instruction data to the
AllInstructions
list in the same file, including the opcode, mnemonic string, instruction size, and execution function. - Implement the execution function. See the example in the documentation for details.
An open-source project is never complete. You can contribute by:
- Submitting bugs and feature requests.
- Reviewing source code changes.
- Testing on macOS and helping maintain compatibility on all platforms.
If you're interested in solving problems and contributing directly to the codebase, check out the issue page and look for good first issues.
- Artur Brenner Weber for providing macOS/arm64 builds and assisting with documentation.
- Daniel Contente Romanzini for providing macOS/amd64 builds.