# PeOS 0.16.0 Technical Alpha

## What's new since 0.15.0

- **USB sticks open by themselves.** Put a stick in and it is mounted on
  `/media1`, `/media2`... (the first number free), in exFAT or FAT32, with
  no command; taking it out unmounts it. A new service, `diskd`, does it;
  the EFI partition and the system's own disk are never touched.
- **exFAT, read and written**: big files, long names, the format most
  sticks and memory cards come with. What PeOS writes is clean for macOS's
  `fsck_exfat`, and macOS reads it back.
- **Disks in Curiosity.** A side bar with the disks that are open, the
  stick you are in highlighted, and Eject; the **Disk manager** lists every
  disk and partition, what is on it, its size and the space used, and
  mounts, unmounts and ejects (it does not format yet). A disk with a file
  still open on it is not unmounted: Curiosity says it is in use.
- **Wi-Fi on the MacBook Pro 2019 (BCM4364)** joins WPA2 networks, gets an
  address and browses (the join that froze the system in 0.13.1 was a
  `printf` of the kernel). Its firmware is still Apple's and still not in
  the published images (see below).
- **A new Wi-Fi tab** in Settings: the networks in range (the strongest
  first, the signal, the security), a password field that hides what you
  type, clear errors (a wrong password, a network not found), Disconnect,
  and the networks saved, with Forget. **PeOS joins again by itself** a
  saved network when it comes back in range, or after the link drops.
  Saved networks keep the WPA2 key derived from the password, never the
  password.
- **Themes.** The Theme tab has the background (moved from Display) with a
  preview, and the 19 custom colours in a section that opens. A theme can
  be **exported** to a `.petheme` file (in `/starlight/themes` or on a
  stick) and **imported** back, also with a double click in Curiosity.
- **Updates apply again.** An installed PeOS could not update since 0.15.0:
  its XFS driver could not change folders bigger than one block (like
  `/bin`). Now it can (the "leaf" format), and the update test goes to the
  end: the new version boots and stays, and going back works.
- **Limine 12.9.6**, the bootloader, in the ISO and in new installs (an
  installed PeOS keeps its own); its licence is now in the images.
- **Diablo II** (`d2d.app` 1.1.0, with your own copy of the game) finds
  its data on a stick by itself, and loads it about 8 times
  faster from exFAT than from FAT32.
- **Under the hood**: a watchdog of the kernel (`watchdog on` in Orbit)
  that shows where a CPU stopped, over the desktop; the kernel's console
  draws in a thread of its own, and its `printf` knows `%.*s`, `%p` and
  widths; a USB stick plugged in is recognised in a thread (not inside an
  interrupt) and answers its first command; netd lets its address go when
  the Wi-Fi link drops and asks for a new one when it is back.
- **For developers**: the [Starlight App Kit](../starlight-app-kit) 0.16.0
  (SDK 1.15.0, SLUI SDK 1.0.16) has the disks (`peos/disks.h`,
  `peos_disks_watch`), the Wi-Fi's events (`peos_wifi_watch`), the saved
  networks (`peos/wifid.h`), password fields (`slui_text_secret`), a row
  that opens a section (`slui_disclosure`) and themes (`peos/petheme.h`).

## About this release

The PeOS meant to be tried by someone who did not build it: boot the ISO in
a virtual machine and you are on the desktop. It is an alpha: the point is
to show what PeOS looks like and how fast it feels, and to let developers
write simple apps for it.

## What is in it

- **Starlight**, the desktop (0.20.0, the "Soft UI"): pearl grey surfaces and
  night/neon cards, a dock on the left and an app manager, a top bar with the
  network, volume, clock and what plays, widgets on the desktop (clock,
  calendar, volume, CPU, network), notifications, a day and a night theme
  with four accents and your own colours, resizable windows.
- **Apps**: Pegasus (the browser), Orion (pictures), Orfeus (music),
  Calendar (events and reminders), Monitor (CPU, memory, disk, network,
  processes), Settings, Curiosity (files and disks), Voyager (text editor),
  Calculator, Orbit (terminal), Consigli (tips), Abisso (a game), PeStore
  (apps), the installer and two developer demos.
- **Languages**: English (the default) and Italian, for the system and its
  apps, chosen in Settings > General > Language and applied at once.
- **Live session**: the ISO boots with BIOS and UEFI; everything runs from
  RAM and can be written to while it runs.
- **Network**: DHCP, DNS, TCP and UDP in a userland service (netd), on
  virtio-net, Intel e1000/e1000e and Realtek RTL8169 cards; Wi-Fi on the
  RTL8723BE and the MacBook Pro 2019's BCM4364; TLS and HTTP in libpeos.
- **Disks**: XFS (the system), exFAT and FAT32 (sticks and other disks),
  read and written; USB sticks mounted by themselves.
- **Sound**: Intel HD Audio, and the T2 chip's on a MacBook Pro 2019; several
  programs at once; the music service.
- **Pointer**: USB mice and absolute tablets (the pointer follows the host's
  without capture), PS/2 mice, virtio tablets; the trackpad of a MacBook Pro
  with the T2 chip.
- **For developers**: the Starlight App Kit 0.16.0 builds apps on macOS,
  Linux or WSL, and `make serve` + `appget` installs them in a running VM, no
  rebuild of PeOS needed. The API reference is in
  [starlight-app-kit/docs/api-reference.md](../starlight-app-kit/docs/api-reference.md).

## Known limits

- **Pegasus**: Google's search stops on its "unusual traffic" page, and the
  reCAPTCHA check does not open its challenge. No video and no audio on
  pages, no printing; some CSS is not drawn yet (`@container`, `@layer`,
  filters, animations), and pages show the time in UTC. Big pages with
  many scripts take seconds under emulation. What Pegasus still lacks is
  listed in [docs/pegasus-gaps.md](pegasus-gaps.md).
- **Orfeus**: its library is the `/music` folder, read again at every start
  (a song elsewhere plays when opened from Curiosity); FLAC, MP3
  and WAV (no Ogg Vorbis or AAC yet). The media keys work on PS/2 keyboards
  and on USB keyboards that send them as keys; most USB keyboards send them
  as "consumer" controls, which PeOS does not read yet: use Super + ←/→.
- **PeStore**: in the live session apps installed from it are lost at
  shutdown like everything else. On a 1280x800 screen the dock is full:
  PeStore is in the app manager.
- **Updates**: only an installed PeOS updates (in the live session
  Settings says to download the new ISO). XFS folders with more than about
  500 names (the "node" format) are still read-only for PeOS.
- **Disks**: the Disk manager does not format or partition yet; NTFS (the
  disks of Windows) is not read. FAT32 is slow on big files: exFAT is much
  faster.
- **Themes**: a `.petheme` keeps the font's name, not the font: if PeOS
  does not have it, the theme comes in with the font in use. Exporting and
  importing use fixed folders (`/starlight/themes` and the sticks) until
  Curiosity has a file picker.
- **Orion and Curiosity**: deleting erases (there is no bin yet); copying a
  picture in Orion copies its path, not the picture. Curiosity cuts from its
  right-click menu only (there is no key for it).
- **Tested in QEMU** (macOS, UEFI and BIOS). In UTM (x86_64 emulated on Apple
  Silicon) it boots, with keyboard, network and audio. VirtualBox and VMware
  are not tested yet: please report what you find.
- **x86-64 only**, with a CPU that has XSAVE (any Intel Core or AMD Ryzen).
  512 MB of RAM is the minimum, 1 GB is comfortable (more for big pages).
- **The live session is in RAM**: what you change (settings, calendar
  events, files, bookmarks, downloads, installed apps, saved Wi-Fi networks,
  the music queue) is lost when the VM is switched off. The About panel says
  "live session".
- **Network cards**: virtio-net, e1000 (82540EM), e1000e (82574), RTL8169.
  VMware's vmxnet3 is not supported (choose "e1000" or "e1000e"). Wi-Fi on
  the RTL8723BE and on the MacBook Pro 2019 (BCM4364), WPA2 and open
  networks (no WPA3 yet). The BCM4364's firmware is not in the published
  images: it is Apple's, copied from macOS with `tools/fetch_mac_wifi_fw.sh`
  into a build of your own.
- **Disks**: AHCI (SATA), ATA and USB storage. No NVMe and no virtio-blk:
  the installer cannot install on them (VMware's new VMs use NVMe: add a
  SATA disk).
- **USB**: xHCI (USB 3) for keyboards, mice, tablets and sticks; USB 2
  (EHCI) only for storage, no USB 1 controllers. In a VM choose a USB 3.0
  controller, or a PS/2 mouse.
- **Video**: the firmware's framebuffer, at the resolution the firmware
  chooses; under QEMU, virtio-gpu can change it. No 3D acceleration. On a
  dense screen raise the interface scale (Settings > Display).
- **Audio**: Intel HD Audio, and the T2 chip of the MacBook Pro 2019 (its
  speakers and jack; the volume starts at 10% at every boot, on purpose).
- **Keyboard layouts**: US and Italian.
- **Slow under emulation**: UTM on Apple Silicon emulates the whole x86 CPU;
  PeOS works but frames are slow there.
- **Recovery**: if netd, musicd, diskd or wifid stops, init starts it again
  (netd's return is tested); Starlight is started again the same way, but
  the apps that were open do not come back on screen.
- **Installing**: the installer runs from the live ISO and erases the whole
  target disk, which must be SATA/AHCI (in UTM: interface "IDE"; in VMware:
  SATA, not NVMe). The installed disk boots with **UEFI only**. On real
  hardware it is possible but not guaranteed.
- Messages of the kernel (in the boot log) and of the terminal are in
  English only.

## Files

| File | |
|---|---|
| `peos-0.16.0.iso` | The live ISO: boot it as a CD in any VM (BIOS or UEFI). |
| `peos-0.16.0-hdd.img.xz` | A disk image with PeOS installed, for QEMU (UEFI, AHCI). |
| `peos-0.16.0-update.tar.gz` | The update package, signed: what an installed PeOS downloads to update itself. |
| `latest.json`, `latest.json.sig` | What the newest version is, signed: what an installed PeOS reads to know. |
| `SHA256SUMS-0.16.0` | The checksums. |

## Versions

PeOS 0.16.0, Starlight 0.20.0, Starlight App Kit 0.16.0 (SDK 1.15.0, SLUI SDK
1.0.16), Limine 12.9.6. Built from the commit the About panel shows.

## Credits

Pegasus draws text with Outfit, Source Serif 4 and JetBrains Mono (SIL Open
Font License), images with stb_image and NanoSVG, and makes secure
connections with mbedTLS (Apache License 2.0); the list is in Pegasus, at
`pegasus:credits`. Orion decodes pictures with stb_image and NanoSVG. The
MP3 decoder is ours; its Huffman tables and synthesis window are those of
the standard (ISO/IEC 11172-3), taken from minimp3 (public domain, CC0).
PeOS boots with Limine (BSD-2-Clause; its licence and third-party notes are
in `licenses/limine/`). The music that comes with the system was made for
PeOS.
