Skip to content

Commit 9d56b1d

Browse files
Merge pull request #42 from badger/martinwoodward-update-simulator-firmware
Sync simulator with Universe 2026 firmware and update home page apps
2 parents f8ccff8 + cf32bb6 commit 9d56b1d

60 files changed

Lines changed: 376 additions & 41 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitattributes‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Simulator files are served with byte sizes from filesystem.json, so keep LF on every platform
2+
public/simulator/filesystem/** text=auto eol=lf
3+
# Editor examples are generated with LF; keep them byte-identical to the sync output
4+
public/editor-examples/** text=auto eol=lf
5+

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ unchanged.
8989

9090
Do not edit `src/data/app-descriptions.json` by hand. It is the generated website
9191
copy used by normal builds and deployment. A newly added store app remains
92-
installable and shows `Description not available` until the descriptions are
92+
installable and is listed without a description until the descriptions are
9393
updated.
9494

9595
## 📁 Project Structure

‎public/editor-examples/raycast.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ def vector(self, offset=0, length=1):
7070
minimap_overlay_len = len(minimap_overlay_mv)
7171

7272

73+
# @micropython.viper - a native memset. The viper emitter isn't in the WASM
74+
# build, so it's shimmed with the plain-Python loop below (slower, but it runs).
75+
# def clear(buf: ptr32, length: int):
76+
# for i in range(length):
77+
# buf[i] = 0
7378
def clear(buf, length):
7479
for i in range(length):
7580
buf[i] = 0

‎public/editor-examples/text.py‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# text.tokenise() + text.draw() lay out word-wrapped rich text inside a rect.
2-
# [tags] in the string call your glyph_renderers - here to change pen colour
1+
# screen.text() lays out word-wrapped rich text inside a rect. [tags] in the
2+
# string call glyph renderers registered with add_glyph() - here to change pen colour
33
# mid-sentence and to blit an inline skull image.
44

55
import math
66

77
badge.mode(HIRES)
88

99
skull = image.load("/system/assets/skull.png")
10-
screen.font = rom_font.compass
10+
screen.font = font.compass
1111

1212

1313
def pen_glyph_renderer(_image, parameters, measure):
@@ -36,7 +36,7 @@ def circle_glyph_renderer(image, _parameters, measure):
3636
return None
3737

3838

39-
nope = rom_font.nope
39+
nope = font.nope
4040

4141

4242
glyph_renderers = {
@@ -45,6 +45,9 @@ def circle_glyph_renderer(image, _parameters, measure):
4545
"circle": circle_glyph_renderer
4646
}
4747

48+
for glyph_name, renderer in glyph_renderers.items():
49+
add_glyph(glyph_name, renderer)
50+
4851

4952
while True:
5053
i = round(badge.ticks / 200)
@@ -59,9 +62,8 @@ def circle_glyph_renderer(image, _parameters, measure):
5962
y = 5
6063
width = math.sin(badge.ticks / 500) * 50 + 200
6164
height = 220
62-
tokens = text.tokenise(screen, message, glyph_renderers)
6365
bounds = rect(x, y, width, height)
64-
text.draw(screen, tokens, bounds, line_spacing=1, word_spacing=1.05)
66+
screen.text(message, bounds, line_height=1, word_spacing=1.05)
6567

6668
screen.pen = color.rgb(60, 80, 100, 100)
6769
screen.line(bounds.x, bounds.y, bounds.x + bounds.w, bounds.y)

‎public/editor-examples/vector_text.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ def circle_glyph_renderer(image, _parameters, measure):
4242
"circle": circle_glyph_renderer
4343
}
4444

45+
for glyph_name, renderer in glyph_renderers.items():
46+
add_glyph(glyph_name, renderer)
47+
4548
while True:
4649
screen.font = mona_sans
4750
screen.antialias = image.X2
@@ -64,9 +67,8 @@ def circle_glyph_renderer(image, _parameters, measure):
6467
y = 10
6568
width = math.sin(badge.ticks / 500) * 50 + 230
6669
height = 224
67-
tokens = text.tokenise(screen, message, size=size, glyph_renderers=glyph_renderers)
6870
bounds = rect(x, y, width, height)
69-
text.draw(screen, tokens, bounds, line_spacing=1, word_spacing=1.05, size=size)
71+
screen.text(message, bounds, font_size=size, line_height=1, word_spacing=1.05)
7072

7173
screen.pen = color.rgb(60, 80, 100, 100)
7274
screen.line(bounds.x, bounds.y, bounds.x + bounds.w, bounds.y)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Pre-installed app icons
2+
3+
Generated from the badge firmware Menu icons (`apps/menu/src/icons.py`), which are derived from
4+
[Material Symbols](https://github.com/google/material-design-icons) (sharp, weight 500) by Google,
5+
licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
6+
7+
`monas-expedition.svg` is a simple compass drawn for this site.

‎public/images/apps/2026/badge.svg‎

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)