https://benbridle.com/projects/bedrock.html
benbridle.com Projects
Bedrock
* Bedrock
* Overview
* Tutorials
* Documentation
* Implementations
* Background
* Live demonstrations
* Cobalt
* Snake
* Microwave clock
* System information
* On-screen keyboard
Bedrock is a compact and portable 8-bit computer system, designed to
last forever. Click here to jump straight to the live demos.
[bedrock-sc]
Overview
Bedrock is a computer system that makes it easy to write useful
programs that will last forever. The system is small and quick to
learn, with only 32 instructions and 12 devices to remember.
Bedrock isn't a real computer system that you can pick up and hold in
your hands. It's a specification that describes an interface for any
kind of computing device, allowing you to write programs that will
run on any device without having to worry about the peculiarities of
the underlying hardware.
Programs written for Bedrock can run on any computer system, so long
as a Bedrock emulator has been implemented for that system. The
emulator acts as a thin translation layer between the program and the
system, and is designed to be easy to implement on any computer,
console, or handheld, no matter how old or limited. The core system
can be implemented in a few hours, and the 12 standard devices can be
implemented and connected as needed.
Programs can currently run on Windows, Linux, the web, and the
Nintendo DS. See the live demonstrations section at the bottom of
this page for examples of the kinds of programs that can run on
Bedrock.
Tutorials
* Bedrock: Printing a string
A hands-on tutorial that shows how to print a string to the
terminal. It assumes no former knowledge about Bedrock, and
almost no former knowledge about programming in general.
Documentation
* User manual
The user manual is aimed at people who are learning about or
writing programs for the Bedrock system. It contains many
examples in the form of runnable code snippets.
* Specification
The specification is aimed at people who are implementing the
system from scratch.
* Examples
Implementations of some popular algorithms as runnable programs.
* Example: Microwave clock
Full editable source code for the microwave clock program.
Implementations
To write and run a program using Bedrock you'll need an assembler and
an emulator. An assembler is used for converting program source code
into a Bedrock program, and an emulator is used for running any
Bedrock program on your chosen system:
* bedrock-js
An assembler and emulator that can be embedded in a webpage,
written in Javascript.
* bedrock-pc
An assembler and emulator for Windows and Linux computers,
written in Rust.
Background
Bedrock originated as a fork of the Uxn virtual machine and Varvara
computing stack, with the aim of improving performance on extremely
resource-constrained systems. It has since diverged in many
significant ways, most notably by restricting the interfaces between
components and by stripping down the assembler and the instruction
set. See Bedrock: Differences from Uxn for more details.
The name Bedrock comes from the concept of a 'bedrock abstraction'
coined by this blog post, though it takes a different approach to the
one advocated for in the post. Bedrock achieves habitability not by
producing a higher-level instruction set, but by reducing the
complexity of the program environment.
Live demonstrations
The following programs are all running using the bedrock-js emulator,
which was thrown together in a few days. There is a lot of room for
improvement.
Cobalt
* cobalt-demo.br (47665 bytes)
A full-featured pixel art drawing program, with brushes,
textures, and undo history.
Snake
* snake.br (1133 bytes)
A graphics demo showing a coloured stream of letters that follow
the mouse cursor.
Microwave clock
* clock.br (393 bytes)
A clock in the style of an old microwave oven display.
System information
* sysinfo.br (4918 bytes)
Shows information about the Bedrock implementation being used.
On-screen keyboard
* keyboard.br (2774 bytes)
An on-screen keyboard, designed to be used as the keyboard for
Bedrock on the Nintendo DS.