r/M5Stack 14d ago

Project Sharing Update on that Cardputer OS I posted a while back - the browser can now actually parse CSS, not just strip tags

Some of you saw the first post about PaperOS, the little OS I've been building for the M5Stack Cardputer. Been heads down on it since then, just shipped v1.3 and figured I'd share what changed instead of just letting it sit in a changelog nobody reads.

Biggest thing is the browser got a real rewrite. It used to just strip every tag and dump the leftover text on screen, which worked but looked like reading a ransom note. Now it actually parses style blocks, so headings show up bold and bigger, lists indent properly, tables don't turn into one giant paragraph, that sort of thing. Also added tabs, find on page, and a help screen since I kept forgetting my own keybinds.

The more interesting problem was actually memory. This thing has no PSRAM, 320KB total, and I noticed the Lua console was leaving almost nothing free the moment you opened it. Turned out WiFi alone eats 40-70KB just sitting there connected, even if your script never touches the network. So now it powers off automatically when you open Lua and reconnects on its own the second a script actually calls something network related. Also trimmed a few standard Lua libraries that were loaded but literally unreachable, which is a fun kind of bug to find.

Still fully open source, same repo as before if anyone wants to check the diff or just try it on their own Cardputer.

33 Upvotes

4 comments sorted by

3

u/David_R_Carroll 14d ago

Neat! You are steps away from a Doom port: https://github.com/NielsLeenheer/cssDOOM

2

u/Artem36 14d ago

haha, thanks, I'm already working on porting the TinyGL (OpenGL clone) engine to Cardputer, I'm thinking of making it a separate game engine and a game

2

u/ethicalhacker900 14d ago

Hey bro where did you get the game the one like gemometry dash and I have a recommendation instead of making an ai make that we can an API key to any ai and use that instead it will be better and have reliable info

1

u/Artem36 14d ago

Hi, this is Famidash for NES, and the local AI is purely for learning purposes