servicepoint/README.md

82 lines
3.3 KiB
Markdown
Raw Normal View History

# servicepoint
2024-05-12 00:03:10 +02:00
2024-05-12 01:49:38 +02:00
In [CCCB](https://berlin.ccc.de/), there is a big pixel matrix hanging on the wall. It is called "Service Point
Display" or "Airport Display".
2024-05-26 14:53:26 +02:00
This repository contains a library for parsing, encoding and sending packets to this display via UDP in multiple
programming languages.
2024-05-12 00:03:10 +02:00
2024-05-26 14:53:26 +02:00
Take a look at the contained crates for language specific information:
2024-05-12 00:03:10 +02:00
2024-05-26 14:53:26 +02:00
| Language | Readme |
|----------|---------------------------------------------------------------------|
| Rust | [servicepoint](crates/servicepoint/README.md) |
| C / C++ | [servicepoint_binding_c](crates/servicepoint_binding_c/README.md) |
| C# / F# | [servicepoint_binding_cs](crates/servicepoint_binding_cs/README.md) |
2024-05-13 18:59:31 +02:00
## Projects using the library
2024-05-26 15:15:31 +02:00
- screen simulator (rust): [servicepoint-simulator](https://github.com/kaesaecracker/servicepoint-simulator)
2024-09-07 12:27:07 +02:00
- A bunch of projects (C): [arfst23/ServicePoint](https://github.com/arfst23/ServicePoint), including
- a CLI tool to display image files on the display or use the display as a TTY
- a BSD games robots clone
- a split-flap-display simulator
- animations that play on the display
2024-05-26 15:15:31 +02:00
- tanks game (C#): [servicepoint-tanks](https://github.com/kaesaecracker/cccb-tanks-cs)
- cellular automata slideshow (rust): [servicepoint-life](https://github.com/kaesaecracker/servicepoint-life)
2024-05-13 18:59:31 +02:00
To add yourself to the list, open a pull request.
2024-05-26 15:08:41 +02:00
## About the display
- Resolution: 352x160=56,320 pixels
- Pixels are grouped into 44x20=880 tiles (8x8=64 pixels each)
- Smallest addressable unit: row of pixels inside of a tile (8 pixels = 1 byte)
- The brightness can only be set per tile
- Screen content can be changed using a simple UDP protocol
- Between each row of tiles, there is a gap of around 4 pixels size. This gap changes the aspect ratio of the display.
### Binary format
A UDP package sent to the display has a header size of 10 bytes.
Each header value has a size of two bytes (unsigned 16 bit integer).
Depending on the command, there can be a payload following the header.
The commands are implemented in DisplayCommands.
To change screen contents, these commands are the most relevant:
2024-05-26 15:15:31 +02:00
2024-05-26 15:08:41 +02:00
1. Clear screen
- command: `0x0002`
- (rest does not matter)
2. Send CP437 data: render specified text into rectangular region
- command: `0x0003`
- top left tile x
- top left tile y
- width in tiles
- height in tiles
- payload: (width in tiles * height in tiles) bytes
- 1 byte = 1 character
- each character is rendered into one tile (mono-spaced)
- characters are encoded using code page 437
3. Send bitmap window: set pixel states for a rectangular region
- command: `0x0013`
- top left tile x
- top left _pixel_ y
- width in tiles
- height in _pixels_
- payload: (width in tiles * height in pixels) bytes
- network byte order
- 1 bit = 1 pixel
There are other commands implemented as well, e.g. for changing the brightness.
2024-05-26 15:15:31 +02:00
## What happened to servicepoint2?
2024-05-26 15:08:41 +02:00
2024-05-26 15:15:31 +02:00
After `servicepoint2` has been merged into `servicepoint`, `servicepoint2` will not continue to get any updates.
2024-05-13 18:59:31 +02:00
## Contributing
Contributions are accepted in any form (issues, documentation, feature requests, code, review, ...).
2024-05-12 00:03:10 +02:00
2024-05-13 18:59:31 +02:00
All creatures welcome.