BEEP8

From Fantasy Console Wiki
Jump to navigation Jump to search

BEEP-8[edit]

BEEP-8 is a modern fantasy console designed for C/C++ developers. It emulates a tiny ARM-v4a–style CPU, provides a 16-color graphical environment, and runs entirely inside a web browser. Games are compiled into ROM images using a GCC-based toolchain, then executed by a lightweight, high-performance JavaScript emulator.

Overview[edit]

BEEP-8 aims to capture the spirit of classic embedded development while keeping the workflow simple, fun, and approachable. Unlike most fantasy consoles that use a scripting language (Lua, JS, etc.), BEEP-8 runs **real compiled machine code**, allowing developers to:

  • Write games in standard C or C++
  • Use a predictable, cycle-accurate execution model
  • Learn low-level programming concepts (fixed-point math, registers, interrupts, timers, etc.)
  • Enjoy retro-style constraints similar to handheld consoles

System Specifications[edit]

CPU
Emulated ARM v4a running at approximately 4 MHz
Two-stage pipeline, integer-only ALU
Banked registers, simple exception handling
No floating-point support (fixed-point math recommended)
Memory
1 MB RAM
1 MB ROM (for compiled binaries)
Display
Resolution: 128 × 240 (portrait)
Color depth: 4-bit (16-color palette, PICO-8–style)
Background layers, sprites, wireframe line drawing
Sound
Namco C30-like PSG synthesizer
Implemented in JavaScript for emulator playback
OS / Kernel
Custom lightweight RTOS (b8OS)
Supports threads, system calls, timers, and IRQs
Applications interact with hardware through memory-mapped devices

Development Environment[edit]

BEEP-8 uses a GCC cross-compiler to convert C/C++ code into ARM-v4a machine code. A typical workflow:

  1. Write your program in C/C++ using the BEEP-8 SDK
  2. Compile it into a ROM image
  3. Load the ROM into the browser-based emulator
  4. Run and debug using logging, tracing, and visual debugging tools

The SDK includes:

  • Graphics API (PICO-8–compatible layer + low-level PPU commands)
  • Fixed-point math library (fx8, fx12)
  • Sound API
  • Input handling (touch, mouse, virtual buttons)
  • File system and hardware abstraction
  • Example projects and templates

Graphics System[edit]

BEEP-8 provides two layers of graphics APIs:

PICO-8–style High-Level API[edit]

Simple drawing for beginners:

  • line(x0, y0, x1, y1, color)
  • circ(x, y, r, color)
  • spr(index, x, y)
  • map(x, y)
  • clip(x, y, w, h)

Low-Level PPU API[edit]

For advanced users:

  • Ordering tables (OT)
  • Direct sprite attribute writes
  • Depth-sorted primitives
  • Wireframe polygon renderer
  • Palette updates and flushes

This dual approach allows both beginners and experts to work comfortably.

Example Games[edit]

Several example projects are included in the SDK:

  • 1D-Pacman
  • Flappy-like demo
  • PenPen
  • Yukiss
  • Bird-Post
  • Hom-Post
  • Wireframe experiments and physics demos

These serve as learning material for new developers.

Philosophy[edit]

BEEP-8 is built around three core ideas:

  1. Real low-level programming should be fun
  2. Constraints spark creativity
  3. A retro console can live inside the modern web browser

Unlike other fantasy consoles, BEEP-8 does not interpret a scripting language. Instead, it runs **actual machine code**, meaning any high-level language that can compile to ARM could theoretically be supported.

External Links[edit]