Skip to main content

What can I do with Hybrix?

Hybrix is appropriate for anyone ages 13 or older. It's best for serious learners who have already demonstrated ability in logical reasoning or mathematics.

Below are example lessons for different personas.

Creative explorer

Lesson ideas for this skill level:

  • Learn to make pixel art: The low resolution graphics and limited palette make it extremely easy for beginners to make interesting artwork.
  • Animate sprites: Using the sprite editor, create animation frames by copying your image and modifying it.
  • Draw tilemaps: Create retro 2D game levels using simple tiles such as bricks, grass, and sky.
  • Learn about ASCII text: Use your keyboard to type characters the console, experimenting with colors, graphics glyphs, and control codes.
  • Make your own font: Modify the default font to make your own character styles and glyphs.
  • Compose music: Create simple songs using the Hybrix music tracker. Learn about rhythm and sound channels.

Seventh grader

Lesson ideas for this skill level:

  • Play with the debugger: Try stepping through a program in the debugger to watch how programs run. Set breakpoints and inspect variables.
  • Simple programs: Control a ball using IF statements to update the (X,Y) coordinates of a sprite.
  • Control flow: Practice making small algorithms using loops and functions.
  • Mod someone else's game: From a provided video game project, use the board system to design your own levels.
  • First look at assembly language: Write simple statements and then examine the compiled assembly language. Observe how certain expressions are much more efficient than others.

High school student

Lesson ideas for this skill level:

  • Make complete programs: Surprisingly little code is needed to make interesting apps such as: a desk calculator, a decorative clock app, tic tac toe, the "snake" game, etc.
  • Pseudorandom numbers: Implement a pseudorandom number generator, seeded using the system timer. Learn about modular arithmetic.
  • Create your own Jamdac instruments: Using the instrument editor, study basic DSP elements such as oscillators, envelope generators, filters, delay effects, and reverb.
  • Program optimization: Get hands-on experience with performance tuning by counting clock cycles and memory bytes. Learn how better algorithms can greatly reduce these costs.
  • Linked lists: Learn about linked lists, doubly-linked lists, and circular linked lists. Study how the framework's [ENGINE] uses these data structures to optimize its "renderlist" and "thinklist."
  • Inline assembler: Study the compiler's output for a simple function that paints pixels. Then speed up your program by rewriting it using hand-coded assembly language.*
  • Floating point: Learn about IEEE floating point, its memory representation, and imprecision (which is particularly noticeable on a 32-bit CPU).
  • Bresenham's algorithm: Learn how to plot lines and perform tilemap collision detection using this workhorse of 2D graphics.
  • Simple device drivers: Use memory-mapped input/output (MMIO) to access easy hardware interfaces such as the mouse, gamepad, and realtime clock.

* The assembler add-on is not available yet.

Computer science undergraduate

Lesson ideas for this skill level:

  • Advanced device drivers: Use memory-mapped input/output (MMIO) to access more complex hardware interfaces such as the storage controller, Palix, and Jamdac systems.
  • Calling conventions: Learn about the Hybrix compiler's calling convention, including representation of the SELF pointer.
  • Vtables: Study how the compiler implements dynamic dispatch and runtime type checks using vtables.
  • CPU event handlers: Learn the difference between traps, faults, and interrupts. Implement a CPU event handler.
  • Add new framework features: For example, study the sprite allocator and actor system. Then improve it, or replace it entirely.
  • The garbage collector: Study the Hybrix garbage collector (only 500 lines of code!) and its memory blocks. Add new features to improve its algorithm.*
  • Regular expression compiler: Implement a trivial regular expression matcher, then optimize it by generating assembly language at runtime.
  • Machine language monitor: Implement a simple assembler and disassembler that run on the virtual computer itself, directly modifying its memory.

* The assembler add-on is not available yet.

Fun projects for a pro

These exercises require additional tooling outside the Hybrix website:

  • Custom compiler: Implement your own toolchain that generates Hybrix ROMs as its output.
  • Cross compiler: Retarget a third-party compiler such as LCC or WebAssembly to target the Chombit CPU. The unique framed register architecture makes this an interesting exploration.