CheatMaker / genesis

Retro OS written in Jack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Genesis

Minimal OS written in Jack.

Build

Tested on Ubuntu 20.04.

Clone the repository.

git clone https://github.com/abhaynayar/genesis

For the compilation, translation and assembling of Jack programs, you need Python.

For the CPU emulator, you need pygame.

Build and run the project using:

./run.sh

What the build script does:

  • Compiles the *.jack files in kernel/ and userland/ directories.
  • Copies the VM files to the build/ directory.
  • Translates the compiled VM code to Hack assembly. build/out.asm
  • Assembles the Hack assembly code to machine code. build/out.hack
  • Runs the machine code on the CPU emulator.

Docs

Todo

Applications

  • Text Editor.
    • SHIFT key support.
    • Fix backspace quirks.
    • Hold key for multi-input.
  • Chip8 Interpreter.
  • GUI Toolkit.

Language

  • For loops.
  • Hex numbers.
  • If-else ladders.
  • Shift operations.
  • Switch statements.
  • Declare variables anywhere.
  • Code coverage.
  • Error handling.
  • Inline assembly.
  • Coding style guide.
  • Modulo operator.
  • XOR operations.

System

  • File System.
  • C++ Emulator.
  • Sound Support.
  • Network Stack.
  • Timer Interrupts.
  • Shell Text Buffer.
  • Keyboard Interrupts.
  • Hardware-based CPU emulator. (n2t-wasm)

Misc.

  • Fonts with transparent backgrounds.
  • Terminate compiler and shell script on error.
  • Check if Hack file is 64-bit before emulating.
  • Print string and newline in the same function.
  • Check if pixel is already set, if yes then don't update.
  • Output multiple files from assembler; concat them in the build script.
  • Why does XOR only work with a space? => Was not added in JackType.symbols[].

About

Retro OS written in Jack.

License:MIT License


Languages

Language:Python 89.2%Language:C++ 10.0%Language:Shell 0.7%Language:Makefile 0.1%