Audio, USB, NsCDE and more!

Today, people expect many things from a computer, and by extension, from its operating system. For example, they expect to be able to play the song they just downloaded, or to use the joystick they just plugged into the computer without rebooting. These features require not only hardware support, in the form of a sound card or a USB controller, but also operating system support.
Support for audio and USB had been on my Astral TODO list for quite a while. Over the past few months, I have been working on getting both of them to work. Not only that, but I have also been porting NsCDE to Astral in order to replace the current stock FVWM interface. Progress has been great: Astral can now handle USB input, play games with audio, and play music, all while running NsCDE.
Here is a demo of Astral running Minecraft while mocp plays a song in another terminal, with NsCDE as the DE.
Audio
Astral now exposes audio to users via a very simple OSS implementation. The OSS implementation still lacks a lot of features, such as mixing and audio recording, but playback works fine. I chose sndio as the userspace audio layer, together with its sound server, sndiod. This allows mixing without kernel-level mixing support, which simplifies things a lot. The only sound card driver currently implemented is a very minimal Intel HD Audio driver.Most of the relevant ports have already been updated to support sndio, including SDL2 and OpenAL. However, some other ports, such as Wine, do not actually support sndio and will require more complex solutions.
USB
I picked up work on 48cf's xHCI branch and continued it, while also redoing some parts of the USB abstraction. Hotplug mostly works, with the main remaining work being improving cleanup when devices are unplugged. As part of the USB work, I have also implemented a simple USB hub class driver and an HID report parser. The HID class driver supports not only keyboards and mice, but also absolute devices like USB tablets and even joysticks!To allow these different input devices to be exposed to userspace, the old
/dev/mouse* and /dev/keyboard* APIs were dropped in favor of an evdev /dev/input/event* interface. This increases flexibility while also allowing the reuse of existing userspace code like xf86-input-evdev. Some ports like SDL2 and doomgeneric have been updated to support joysticks now as well.NsCDE
I have also started work on porting NsCDE, which is essentially a very extensive FVWM theme that mimics CDE. While I originally wanted to port the original CDE, I decided against it due to the age of the codebase and the amount of patching it would likely require. So far, basic functionality is working. It boots and you can configure themes, colors, etc. There are still some missing things I have to implement, but it is close to being usable. The biggest problem right now is the lack of apkill command, along with a kernel interface for exposing process data. Because of this, some of the FVWM scripts do not work properly.The
startwm command still starts up plain FVWM, as I do not feel NsCDE is stable enough in Astral yet. However, a startnscde command is now provided to start it. Eventually, I want to port a display manager and remove the need to run these two commands manually.What's next?
For NsCDE, I want to implement a sysctl-ish interface for listing system processes and getting their information, alongside apkill implementation. That would also allow me to port programs like btop, which would be quite nice to have. I also want to look into porting a better web browser, likely WebKitGTK. Alongside these, I will continue the fully-self-hosting work, which has been ongoing on-and-off over the past year, mostly with bugfixes and optimizations.Thanks for reading!