Compare commits
30 Commits
v2022.02.1
...
v2022.02.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb9c811bd9 | ||
|
|
ca0ed073e5 | ||
|
|
a744ef1467 | ||
|
|
1d5bcd7bb0 | ||
|
|
7fdc4dc679 | ||
|
|
8b344d7f0b | ||
|
|
041e107aec | ||
|
|
3658be86dd | ||
|
|
12b02f1ae2 | ||
|
|
08da9885b3 | ||
|
|
de8a9c89c8 | ||
|
|
f8a77bdc5f | ||
|
|
5e388107e7 | ||
|
|
fa8cf78cc8 | ||
|
|
6c9fa9519d | ||
|
|
dd9c77f6b0 | ||
|
|
1a2a27b3a9 | ||
|
|
29c63fc6f8 | ||
|
|
806e6a266d | ||
|
|
388e97cee4 | ||
|
|
0181963db6 | ||
|
|
124fc0ccfe | ||
|
|
595d2c7353 | ||
|
|
1a5dae2283 | ||
|
|
bcef360fe0 | ||
|
|
36c3cf0167 | ||
|
|
3eed987ce2 | ||
|
|
0de493954a | ||
|
|
f5d5eade81 | ||
|
|
1224b02750 |
BIN
Bootup Logos/Images/CRT_horror_vacui.gif
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 24 KiB |
BIN
Bootup Logos/Images/ad_maiora.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
Bootup Logos/Images/arcade_galaga.png
Normal file
|
After Width: | Height: | Size: 417 B |
BIN
Bootup Logos/Images/arcade_pac_man.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
Bootup Logos/Images/bender.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
Bootup Logos/Images/f1.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
Bootup Logos/Images/halo_master_chief_helmet.png
Normal file
|
After Width: | Height: | Size: 299 B |
BIN
Bootup Logos/Images/horror_vacui_IronOS.png
Normal file
|
After Width: | Height: | Size: 804 B |
BIN
Bootup Logos/Images/lot_of_tin_is_too_few_tin_IT.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Bootup Logos/Images/open_sw_hw_IronOS_logos.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
Bootup Logos/Images/skulls.png
Normal file
|
After Width: | Height: | Size: 191 B |
BIN
Bootup Logos/Images/terminal.gif
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
Bootup Logos/Images/wh_40k.png
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
Bootup Logos/Images/wwii_kilroy.png
Normal file
|
After Width: | Height: | Size: 407 B |
@@ -1,15 +1,17 @@
|
||||
## Boot up logo's are logos or animations shown on boot of IronOS
|
||||
|
||||
These are programmed into the device just like the normal firmware.
|
||||
They can be (re)programmed as many times as desired after flashing the normal firmware.
|
||||
They can be (re)programmed as many times as desired, after flashing the normal firmware.
|
||||
|
||||
### Data storage format
|
||||
|
||||
The data is stored into the second last page of flash, this gives 1024 bytes of space for the entire payload of bootup logo data.
|
||||
The data is stored into the second last page of flash. This gives 1024 bytes of space for the entire payload of bootup-logo-data.
|
||||
|
||||
The first byte is marked purely to indicate that the page is programmed and which revision of the boot logo logic it is
|
||||
The next byte indicates the frame timing in milliseconds, or `0` to indicate only show first frame for whole bootloader duration (still image mode)
|
||||
Then the OLED buffer is cleared to black, then every frame is encoded as either:
|
||||
The first byte is marked purely to indicate that the page is programmed and which revision of the boot-logo-logic it is.
|
||||
|
||||
The next byte indicates the frame timing in milliseconds, or `0` to indicate: Only show the first frame for the whole bootloader duration (still image mode).
|
||||
|
||||
After the OLED buffer is cleared to black, every frame is encoded as either:
|
||||
|
||||
### Full frame updates
|
||||
|
||||
@@ -18,5 +20,38 @@ Then the OLED buffer is cleared to black, then every frame is encoded as either:
|
||||
### Delta frame update
|
||||
|
||||
`[count of updates][[index,data][index,data][index,data][index,data]]`
|
||||
Where index is byte location into screen buffer, and data is the new byte to plonk down there
|
||||
This just overwrites individual bytes in the output buffer
|
||||
|
||||
Where index is byte location into screen buffer and data is the new byte to plonk down there.
|
||||
This just overwrites individual bytes in the output buffer.
|
||||
|
||||
## Logos preview
|
||||
|
||||
**Static logos**
|
||||
|Logo |Filename |Note |
|
||||
|:-------------:|:-------------:|:-----:|
|
||||
||ad_maiora.png|English: "Towards greater things"|
|
||||
||arcade_galaga.png||
|
||||
||arcade_pac_man.png||
|
||||
||bender.png||
|
||||
||f1.png||
|
||||
||halo_master_chief_helmet.png||
|
||||
||horror_vacui_IronOS.png||
|
||||
||IronOS.png|lefty-version available|
|
||||
||lot_of_tin_is_too_few_tin_IT.png|English: "A lot of tin is too few tin"|
|
||||
||open_sw_hw_IronOS_logos.png||
|
||||
||Pinecil.png|lefty-version available|
|
||||
||skulls.png||
|
||||
||TS100.png|lefty-version available|
|
||||
||TS80.png|lefty-version available|
|
||||
||TS80P.png|lefty-version available|
|
||||
||wh_40k.png||
|
||||
||wwii_kilroy.png||
|
||||
|
||||
**Animated logos**
|
||||
|Logo \* |Filename |Note |
|
||||
|:-------------:|:-------------:|:-----:|
|
||||
| |CRT_horror_vacui.gif||
|
||||
||IronOS.gif|lefty-version available|
|
||||
||terminal.gif||
|
||||
|
||||
_* Click the individual logo to see its animation, if you missed it here._
|
||||
|
||||
@@ -22,6 +22,7 @@ LCD_PAGE_SIZE = 1024
|
||||
|
||||
DATA_PROGRAMMED_MARKER = 0xAA
|
||||
FULL_FRAME_MARKER = 0xFF
|
||||
EMPTY_FRAME_MARKER = 0xFE # If this marker is used to start a frame, the frame is a 0-length delta frame
|
||||
|
||||
|
||||
class MiniwareSettings:
|
||||
@@ -103,7 +104,9 @@ def get_screen_blob(previous_frame: bytearray, this_frame: bytearray):
|
||||
"""
|
||||
outputData = []
|
||||
delta = calculate_frame_delta_encode(previous_frame, this_frame)
|
||||
if len(delta) < (len(this_frame)):
|
||||
if len(delta) == 0:
|
||||
outputData.append(EMPTY_FRAME_MARKER)
|
||||
elif len(delta) < (len(this_frame)):
|
||||
outputData.append(len(delta))
|
||||
outputData.extend(delta)
|
||||
# print("delta encoded frame")
|
||||
@@ -138,18 +141,31 @@ def animated_image_to_bytes(imageIn: Image, negative: bool, dither: bool, thresh
|
||||
frameData.append(frameb)
|
||||
# Store inter-frame duration
|
||||
frameDuration_ms = image.info["duration"]
|
||||
if frameDuration_ms > 255:
|
||||
frameDuration_ms = 255
|
||||
if frameTiming is None or frameTiming == 0:
|
||||
if frameTiming is None:
|
||||
frameTiming = frameDuration_ms
|
||||
else:
|
||||
delta = frameDuration_ms / frameTiming
|
||||
if delta > 1.05 or delta < 0.95:
|
||||
print(f"ERROR: You have a frame that is different to the first frame time. Mixed rates are not supported")
|
||||
sys.exit(-1)
|
||||
print(f"Found {len(frameData)} frames, interval {frameTiming}ms")
|
||||
# We have no mangled the image into our frambuffers
|
||||
frameTiming = frameTiming / 5
|
||||
if frameTiming <= 0 or frameTiming > 254:
|
||||
newTiming = max(frameTiming, 1)
|
||||
newTiming = min(newTiming, 254)
|
||||
|
||||
print(f"Inter frame delay {frameTiming} is out of range, and is being adjusted to {newTiming*5}")
|
||||
frameTiming = newTiming
|
||||
|
||||
# We have now mangled the image into our framebuffers
|
||||
|
||||
# Now we can build our output data blob
|
||||
# First we always start with a full first frame; future optimisation to check if we should or not
|
||||
outputData = [DATA_PROGRAMMED_MARKER]
|
||||
outputData.append(frameTiming)
|
||||
outputData.extend(get_screen_blob([0x00] * (LCD_NUM_BYTES), frameData[0]))
|
||||
outputData.append(int(frameTiming))
|
||||
first_frame = get_screen_blob([0x00] * (LCD_NUM_BYTES), frameData[0])
|
||||
outputData.extend(first_frame)
|
||||
print(f"Frame 1 encoded to {len(first_frame)} bytes")
|
||||
|
||||
"""
|
||||
Format for each frame block is:
|
||||
@@ -164,8 +180,9 @@ def animated_image_to_bytes(imageIn: Image, negative: bool, dither: bool, thresh
|
||||
if (len(outputData) + len(frameBlob)) > LCD_PAGE_SIZE:
|
||||
print(f"Truncating animation after {id} frames as we are out of space")
|
||||
break
|
||||
print(f"Frame {id} encoded to {len(frameBlob)} bytes")
|
||||
print(f"Frame {id + 1} encoded to {len(frameBlob)} bytes")
|
||||
outputData.extend(frameBlob)
|
||||
print(f"Total size used: {len(outputData)} of 1024 bytes")
|
||||
return outputData
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#! /bin/sh
|
||||
echo $1
|
||||
echo $2
|
||||
set -e
|
||||
find Images/ -type f -exec python3 img2logo.py {} "$1" "$2" \;
|
||||
|
||||