I wanted to publish here a first preview of my graphicslibary for the
Attiny85 and a small unfinished operating system.
Even if it is not directly usable on the Arduboy a Port should be trivial and it might be of intrest to some of you.
The version should be seen primarily as a preview, I’m looking forward to constructive feedback and will incorporate it.
Basic features of the system:
Graphics libary for the Attiny85/45,
display of layers, a console, sprites and an algorithmic layer.
Multitasking operating system with compressed virtual ram, and swap to flash.
unfinished networkstack over infrared, I grilled my IR-diode and
and still waiting for a new one, the code is not really tested at this point.
probably the network is not usable at this point because of the port configuration
which is probably still in conflict with the USI for the I2C. Code for receiving
network packets still has to be integrated, but allready works on my arduino.
In all example programs the operating system is mostly
switched off, so this release should be seen primarily as a graphics library. The multitasking and swapping of the operating system is tested and should work well.
I will fix the network as soon as my new diodes and TSOPs arrive.
There are 15 demo programs included in the libary that demonstrate the functionalities.
Here is a Youtube video of the graphic demos, the source code is linked in the text of the youtube videos
(or get it here: Meine Grafiklibary für den Attiny85/SSD1306 und ein kleines Betriebssystem - Mikrocontroller.net )
description of the demos:
In this demostration we draw 2 layers one layer is calculated, the diagram, another layer is blended over it, these layers each have brightness values from 0 to 63 are added together and then converted with error diffusion dithering to black and white
This example shows subtractive blending, and text rendering, 3 layers are drawn, a text layer, above it a calculated layer with a graphic effect, and an image layer, the image layer is subtracted from the layer below it.
In the Flexgrid example, custom fonts are shown, 6 characters are added to the system font and with their help an animation is drawn on the console layer, on top of it there is a graphic layer
#4 Will it Bend
The “Will it Bend” example shows a classic graphics effect, a bending cuboid is drawn using the calculation plane alone.
The “Oscilloscope” example shows the creation of user interfaces. A simulated oscilloscope with a mouse pointer is displayed. A text layer is output below it.
“Alleycat” demonstrates the use of consoles and animations by switching layers. It is a “Hello World” example.
“Plasma star” shows fading effects and a calculated plasma graphic effect.
“Spaceship” demonstrates additive blending and noise through random numbers.
“Wobble” shows the manipulation of layers on-the-fly. During decoding of the layer, a sine wave is superimposed over its vertical position.
“Origin” is a classic Copper effect. A graphic is output and manipulated column by column. This results in a fullscreen animation. In addition, a text layer is displayed.
#11 Face Value
“Face Value” shows a line-by-line graphic effect.
#12 Boing Ball
“Boing Ball” demonstrates the shifting of layers and the use of color keying.
#13 3D Engine
The “3D Engine” shows a rotating cube. Primarily the drawing of lines is demonstrated.
“Crossfade” reads data directly from layers to implement a crossfade between two images.
“Raycaster” is a port of a simple raycasting engine for the PC. An engine of this type was also used in the original “Wolfenstein 3D”.