mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-26 09:02:46 +00:00
feat: Smooth Snake game rendering and expand kernel subsystems
- Implement flicker-free atomic double-buffered frame rendering and sub-tick input polling in userland/lazybox/snake.c - Add multi-input support (PS/2 keyboard scancodes and serial ANSI arrow escape sequences) - Add sound effects (food beep, game over chime) and live speed scaling (+/- keys, P to pause) - Add POSIX /dev/shm shared memory subsystem in ipc/shm_posix.c and include/ipc/shm_posix.h - Add DNS resolver cache with TTL tracking in net/ipv4/dns_cache.c and include/net/dns_cache.h - Add audio tone and jingle synthesizer in sound/beep.c and include/sound/beep.h - Add %o octal formatting support in lib/vsprintf.c - Add LazyBox applets: 'shm', 'dnscache', and 'beep'
This commit is contained in:
1 parent
7c510dae24
commit
6f7f60bf53
13 files changed
+495
-56
No files matched your search
@@ -32,6 +32,9 @@
|
||||
#include <kernel/sub_lang.h>
|
||||
#include <kernel/cpp_kernel.h>
|
||||
#include <userland/snake.h>
|
||||
#include <ipc/shm_posix.h>
|
||||
#include <net/dns_cache.h>
|
||||
#include <sound/beep.h>
|
||||
#include <arch/arch.h>
|
||||
#include <kernel/printk.h>
|
||||
#include <lib/string.h>
|
||||
@@ -963,6 +966,21 @@ static int applet_cpptest(int argc, char** argv) {
|
||||
return cpp_test_oop_subsystem();
|
||||
}
|
||||
|
||||
static int applet_shm(int argc, char** argv) {
|
||||
(void)argc; (void)argv;
|
||||
posix_shm_dump();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int applet_dnscache(int argc, char** argv) {
|
||||
if (argc >= 2 && strcmp(argv[1], "-f") == 0) {
|
||||
dns_cache_flush();
|
||||
return 0;
|
||||
}
|
||||
dns_cache_dump();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int applet_whoami(int argc, char** argv) {
|
||||
(void)argc; (void)argv;
|
||||
const user_account_t* u = auth_get_current_user();
|
||||
@@ -2024,6 +2042,9 @@ static const lazybox_applet_t applets[] = {
|
||||
{"snake", applet_snake, "snake [--demo]", "Interactive ANSI Snake Game", "Games"},
|
||||
{"cppinfo", applet_cppinfo, "cppinfo", "C++ OOP kernel telemetry", "System"},
|
||||
{"cpptest", applet_cpptest, "cpptest", "C++ polymorphism & new/del", "System"},
|
||||
{"shm", applet_shm, "shm", "POSIX /dev/shm shared memory", "System"},
|
||||
{"dnscache", applet_dnscache, "dnscache [-f]", "DNS resolver cache & metrics", "Network"},
|
||||
{"beep", applet_beep, "beep [freq/jingle] [ms]", "PC speaker & HDA tone synth", "Sound"},
|
||||
|
||||
{NULL, NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user