Commit graph

23 commits

Author SHA1 Message Date
Toby Jaffey
d780c4e69d Add UVM32_SYSCALL_RAND to get a "true" random number from the host, as I want to play zigtris and not have it be the same every time. 2025-12-17 20:19:31 +00:00
Toby Jaffey
09985655a2 Fix host-sdl/doom audio. Have app ask via syscall if audio can be rendered before sending, else any mismatch in rates will cause queue over/underflow in host-sdl. 2025-12-15 10:48:10 +00:00
Toby Jaffey
39e7dddc5a Quick and dirty sound for DOOM. Samplerate seems off, but it's just a demo. 2025-12-14 23:32:34 +00:00
Toby Jaffey
147a9f2198 Split includes.
All code needs uvm32_sys.h, but uvm32_common_custom.h is optional (and has defs needed for demos)
2025-12-12 15:56:47 +00:00
Toby Jaffey
ef948e9797 Move target app only includes under apps/common 2025-12-12 15:49:03 +00:00
Toby Jaffey
ed57b62f79 Add render and getkey syscalls, for host-sdl use. 2025-12-12 14:25:01 +00:00
Toby Jaffey
dc93c314e6 Add uintptr_t 2025-12-11 20:36:49 +00:00
Toby Jaffey
6878c5210f Fix weird definition of NULL 2025-12-11 16:57:23 +00:00
Toby Jaffey
b55c2bc88a Add system for memory mapping a block of memory from the host. 2025-12-11 02:36:46 +00:00
Toby Jaffey
da7f70c456 Initial test framework
Clean up makefiles
Everything buildable under docker (or natively)
2025-12-10 16:36:33 +00:00
Toby Jaffey
e07eeab043 Make yield a regular syscall taking an argument.
Allows "wait for interrupt"/"wait for event" type operation where VM code blocks until the host has something for it.
2025-12-10 10:35:18 +00:00
Toby Jaffey
9baedb42e8 Add a stack canary, setup on boot 2025-12-10 01:00:36 +00:00
Toby Jaffey
76fba39a21 Rework syscall ABI.
Syscalls now accept two parameters, allowing for things like "int count = read(buf, len)"
Rather than providing safe signatures for syscalls, the user is now given helper functions to safely parse incoming values, c-strings and slices.
2025-12-09 21:51:35 +00:00
Toby Jaffey
3cdc9ae0ca Default behaviour is to run to end of main 2025-12-09 01:19:09 +00:00
Toby Jaffey
d7673eb0b9 Add common typedefs 2025-12-08 23:48:32 +00:00
Toby Jaffey
41a94d0629 Fix putc() 2025-12-08 20:45:39 +00:00
Toby Jaffey
6735b159ac Make syscall names closer to libc 2025-12-08 16:28:00 +00:00
Toby Jaffey
9d6e6790e1 Cleanup syscall numbers 2025-12-08 12:53:33 +00:00
Toby Jaffey
61fe0e8647 Rename ioreq to syscall 2025-12-08 12:26:47 +00:00
Toby Jaffey
f6cd790fcb ABI info 2025-12-08 07:31:21 +00:00
Toby Jaffey
751f068486 Rework host/target interface to use ecall and proper syscalls instead of CSRs 2025-12-08 02:44:38 +00:00
Toby Jaffey
9e6f6c5a67 Added IOREQ_MILLIS and IOREQ_GETC to get current time and poll keyboard.
IOREQ_GETC implemented inefficiently, but is fine for demo purposes.
2025-12-07 20:29:10 +00:00
Toby Jaffey
c9d30b6d28 uvm32 initial version 2025-12-06 16:44:23 +00:00