Commit graph

10340 commits

Author SHA1 Message Date
bunnie
c49c41699b cleanup warning 2025-03-05 20:54:03 +08:00
bunnie
48d5857681 reflect updated dependencies 2025-03-05 20:51:00 +08:00
bunnie
f91ff92b3a add modals to the baosec emulation target 2025-03-05 20:50:34 +08:00
bunnie
5a36ebbb58 setup modals testing feature in the console runner 2025-03-05 20:50:09 +08:00
bunnie
77d18530f7 match dependencies on modals tests to platform 2025-03-05 20:47:51 +08:00
bunnie
57a4f24a02 restrict ObjectList to std targets only 2025-03-04 19:11:23 +08:00
bunnie
7f860e058c add handler for object list drawing 2025-03-04 19:07:10 +08:00
bunnie
63a9a2b0a0 implement notification models for small screens 2025-03-04 19:06:41 +08:00
bunnie
1e9e02435b add missing model boilerplate
a lot of routines were left blank in the initial port to get
through the core graphics primitives porting. This commit
fills in those missing bits in a fashion that optimizes the
modals for drawing on small displays.
2025-03-04 19:05:41 +08:00
bunnie
3c5975715d kind of hack to make font rendering work on oled displays
so, there is a fundamental abstraction mismatch in the blitstr
library. In Precursor, I created a rule that you can't draw text
on black backgrounds without some special permissions in highly
trusted contexts.

For baosec, this restriction is removed because the whole OS
can run inside a single chip (i.e. we have eliminated most
easy RAM modification attacks, requires probing/glitching; but
as a trade-off, we don't have as much RAM so we can't afford the
extra abstractions).

The compromise is for OLED-type platforms where inverse drawing
is very common to save power, all text ops are assumed to be XOR
operations (so you're always flipping pixels instead of drawing
at a defined color).
2025-03-04 19:02:45 +08:00
bunnie
1a2d6bf772 intercept and warn on more v2 calls in v1 implementation 2025-03-04 19:02:15 +08:00
bunnie
15f41a5f5b object list API elements 2025-03-04 19:01:47 +08:00
bunnie
5d4d009e64 add object list draw routine
this can accelerate drawing of complicated objects, such as
QR codes, that are composed of many rectangles.

there are some warts...in theory, this should be able to seralize
arbitrary-sized lists, but there must be some bug somewhere
that is preventing it from happening. For now, the list length
is clipped to the capacity of a page of memory.
2025-03-04 19:00:33 +08:00
bunnie
8602af4d18 add modals adapter code
initial take just lifted directly from the gam version;
layout details needs adapting for small screen still
2025-03-04 02:07:17 +08:00
bunnie
938e8388e0 add modals acquire/release logic to the graphics layer 2025-03-04 02:05:21 +08:00
bunnie
0790a2dc16 more feature wrangling 2025-03-04 02:04:50 +08:00
bunnie
aafec72e64 add keyboard listener to modals in cramium targets 2025-03-04 02:04:22 +08:00
bunnie
a013720b6f more dependency fixup 2025-03-04 01:29:13 +08:00
bunnie
3be69cf8d1 cleanup dependencies and inter-dependent features 2025-03-04 01:28:38 +08:00
bunnie
4c16d42d45 fixup features 2025-03-04 01:27:37 +08:00
bunnie
c67cb7666c fixup feature dependencies 2025-03-04 01:26:03 +08:00
bunnie
845e40884b add pwm mode setting to loader start 2025-03-04 01:25:02 +08:00
bunnie
06d8760209 add routine to set pwm mode on axp2101 2025-03-04 01:24:41 +08:00
bunnie
56890c35c9
Merge branch 'main' into pddb-feat-down 2025-03-03 02:17:36 +08:00
bunnie
fd1d05aa87
Merge branch 'main' into cram-dev 2025-03-03 02:17:27 +08:00
bunnie
9297879f76 select trng based on emulation mode 2025-03-03 02:15:46 +08:00
bunnie
d1ec6e021a add feature adapters for bao-console so it can work in hosted mode 2025-03-03 02:15:16 +08:00
bunnie
531f5ee4f9 add modals testing mode 2025-03-03 02:14:58 +08:00
bunnie
3dec223d9d allow modals testing in more modes 2025-03-03 02:14:43 +08:00
bunnie
85a216ff0f add a warning if v2 api is sent into graphics-server which is v1 only 2025-03-03 02:14:05 +08:00
bunnie
558b96cfd5 add missing api for emulation 2025-03-03 02:13:52 +08:00
bunnie
da5c215477 fix type defaults for trait
part of the i16->isize transition
2025-03-03 02:12:57 +08:00
bunnie
433d632926 add a clear, modals & text bounds api calls
the text bounds api call is needed in v2 because there is no gam
to mediate this call

clear allows for a fast clear operation that may have hardware
dependent consequences

acquire/release of modals mode is added to the graphics server
as well to implement a feature previously handled by the gam
2025-03-03 02:11:23 +08:00
bunnie
b1ce74faa0 add handler for unspecified clipping areas in v2 targets 2025-03-03 02:10:50 +08:00
bunnie
2957cce789 add some v2 graphics api adapters and opcodes 2025-03-03 02:10:24 +08:00
bunnie
2b36849683 add console to the emulation 2025-03-03 02:09:54 +08:00
bunnie
af043c3a18 make usb-cramium suitable as a dependency for hosted emulation 2025-03-03 02:09:30 +08:00
bunnie
35f42b93db
Merge pull request #629 from betrusted-io/modals-refactor
fix hosted mode build
2025-02-28 17:54:35 +08:00
bunnie
286bfb8135 fix hosted mode build 2025-02-28 17:52:20 +08:00
bunnie
26a147d1b8
Merge branch 'main' into pddb-feat-down 2025-02-28 17:45:06 +08:00
bunnie
02bc28be4a
Merge branch 'main' into cram-dev 2025-02-28 17:44:58 +08:00
bunnie
c5548509c5
Merge pull request #628 from betrusted-io/modals-refactor
Graphics layer now working in both emulation and hardware
2025-02-28 17:44:47 +08:00
bunnie
e84daa0179 fixup more emulation issues 2025-02-28 17:42:30 +08:00
bunnie
cb0cfb3f2c cleanup dependencies 2025-02-28 17:31:14 +08:00
bunnie
5dcf0e33aa customize graphics testing routine for small screen 2025-02-28 17:30:51 +08:00
bunnie
b6ed2c7398 fix cursor overlay in sh1107 display mode 2025-02-28 17:30:17 +08:00
bunnie
db4d21c54c fix emulation bugs 2025-02-28 17:29:43 +08:00
bunnie
e6a85c5573 add note about safety 2025-02-28 16:46:24 +08:00
bunnie
98bfc724aa remove outdated todo list 2025-02-28 16:46:08 +08:00
bunnie
55592afaaf try to isolate dependencies better 2025-02-28 16:45:48 +08:00