Hand-made console of mine:

It features monochrome display SSD1306 (128x64 1bpp) which I decided to "teach" to draw 1bpp game graphics.
It's microscopic size make it'unplayable, so "broken eyes" is the real name of the project, but my marketers rebranded it to "broken ice".
It was fun for me to discover bitmap layout in this display - every byte describes 1x8 vertical (!) stipe in display.
So there are 8x128 byte lines which fills 128x8 display stripes.
1Kb of display data (8x128 bytes) is tranferred every frame to display from ESP32 MCU via I2C bus (2 wires, serial thing) with clock size 1MGz. However FPS is about 30 frames per second. I think this is because display itself makes some delays.
My previous works and projects with old consoles make easy to adapt infrastructe for this 1bpp system.
TileEd map editor was used:

Video of result can be seen here: https://rutube.ru/video/a6493643139bdb2 ... dev.ru&t=2
It's really "broken eyes", phone camera can't focus do it also.
Software rednering is fully decribed in *.h file:
Code: Select all
#include <Arduino.h>
struct map_desc
{
uint8_t *map;
uint8_t *tiles;
int width;
int height;
int xMask;
int yMask;
};
struct sprite_desc
{
uint8_t *tiles;
int width;
};
void tilesViewport(int xStart, int xEnd, int yStart, int yEnd);
void tilesCreateMap(map_desc *mapDesc, uint8_t *map, int width, int height, uint8_t *tiles);
void tilesDeleteMap(map_desc *mapDesc);
void tilesDrawBackMap(map_desc *mapDesc, int bx, int by);
void tilesDrawMap(map_desc *mapDesc, int bx, int by);
void tilesDrawSprite(sprite_desc *sprite, int x, int y);
"Draw back map" draws the most back map without transparent color.
All other functions uses transparency with 1bpp OR->XOR scheme.
That is every tile data has 2 bytes of mask and pixels for every 1x8 line.
So, it was fun and that's all.

