Commit graph

62 commits

Author SHA1 Message Date
Toby Jaffey
4741900562 Tick agnes before drawing each screen, but no faster. 2025-12-15 00:59:27 +00:00
Toby Jaffey
035608b04a Add agnes NES emulator (very slow).
Add -W <n> -H <n> width and height options to host-sdl
2025-12-15 00:37:12 +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
065d2c64aa TinyGL example 2025-12-14 14:45:10 +00:00
Toby Jaffey
a635846e69 Remove -fpeel-loops, now that real issue has been fixed. 2025-12-14 09:50:14 +00:00
Stéphane Travostino
cdfae7d453 apps/maze: fix possible stack overflow
The original code this app is inspired from uses rand(), which returns
a number >= 0.
mulberry32() on the other hand can return a negative number, in which
case will overflow the accesses in the dirs array. Fix that by forcing
the result to be unsigned.
2025-12-14 10:15:04 +01:00
Toby Jaffey
cfc1286874 Regenerate binaries, now default crt0 has changed 2025-12-14 01:36:47 +00:00
Toby Jaffey
173d5056a5 Completely remove UVM32_STACK_PROTECTION unless enabled (requires manually changing crt0.S), as this saves 16 bytes on every .bin 2025-12-14 00:09:32 +00:00
Toby Jaffey
1c9e9296be xxd -n (set variable name) doesn't exist on all systems, use shell utilities to build the headers
Fixes #1
2025-12-13 22:20:38 +00:00
Toby Jaffey
8158ac647c Renaming and documentating header 2025-12-12 20:42:26 +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
5bd6a32013 Move all app common files under apps/common 2025-12-12 15:45:17 +00:00
Toby Jaffey
cb717ed108 use only the amount of extram needed 2025-12-12 15:01:30 +00:00
Toby Jaffey
ce63353156 Update makefile 2025-12-12 14:29:50 +00:00
Toby Jaffey
238b4c5fcf Update for new sdl-host 2025-12-12 14:23:55 +00:00
Toby Jaffey
2108083b75 Only send syscall every other frame, which makes VM stop to draw 2025-12-12 00:03:33 +00:00
Toby Jaffey
2d07f6fcc0 Munching squares 2025-12-11 23:53:43 +00:00
Toby Jaffey
e7485d5972 SDL based host with extram mapped to framebuffer and simple gfx app to accompany it 2025-12-11 23:31:10 +00:00
Toby Jaffey
577aaadacd Zig allocator demo, using extram 2025-12-11 21:18:21 +00:00
Toby Jaffey
a5018dab2f Fix path 2025-12-11 20:53:56 +00:00
Toby Jaffey
1eb03f1747 Fix path 2025-12-11 20:53:03 +00:00
Toby Jaffey
447af909c2 Add memtest and heap examples to build 2025-12-11 20:36:17 +00:00
Toby Jaffey
42cd77a9ff Cleanup paths 2025-12-11 20:35:39 +00:00
Toby Jaffey
f27ed6213c Example of setting up malloc heap on extram 2025-12-11 20:35:11 +00:00
Toby Jaffey
0ded19d04a Basic memory test 2025-12-11 17:46:20 +00:00
Toby Jaffey
67e8fe13c0 Add commandline parsing to host. Add -e <size in bytes> option to configure extram. 2025-12-11 15:44:17 +00:00
Toby Jaffey
7353810199 Move all host examples under host/ 2025-12-11 12:57:59 +00:00
Toby Jaffey
1213c5673f Do .bin inclusion in C code at build 2025-12-11 12:48:41 +00:00
Toby Jaffey
7c9d56ee69 Add fib to apps makefile 2025-12-11 11:52:42 +00:00
Toby Jaffey
8802b4c268 Maze works at -O2 with -fpeel-loops 2025-12-11 01:33:04 +00:00
Toby Jaffey
58f8caee5a Prevent gcc converting block copies/sets to memcpy() and memset(), which don't exist. 2025-12-11 01:10:55 +00:00
Toby Jaffey
e0eb6615c0 maze crashes at high optimisation level, when "maze" variable gets memset 2025-12-10 23:59:11 +00:00
Toby Jaffey
23fc50c820 Unused. 2025-12-10 23:58:43 +00:00
Toby Jaffey
508d41c8c5 Remove stackoverflow error, have one CORE_INTERNAL error for catastrophic crash 2025-12-10 18:42:34 +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
9596838a4b Recursive maze demo, causes big stack usage 2025-12-09 23:29:16 +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
37a178aad7 Remove refs to old CSRs 2025-12-09 01:23:46 +00:00
Toby Jaffey
3cdc9ae0ca Default behaviour is to run to end of main 2025-12-09 01:19:09 +00:00
Toby Jaffey
d56f34dc4e Use cursors 2025-12-09 00:56:07 +00:00
Toby Jaffey
04e7aaef88 Exit on keypress 2025-12-09 00:54:22 +00:00
Toby Jaffey
b6f271ca5a Add newlines 2025-12-09 00:31:41 +00:00
Toby Jaffey
c37286cf01 Add "self", example of building uvm32 to run inside uvm32
mandelbrot app is embedded in host-mini, which is then compiled to a .bin
2025-12-08 23:54:14 +00:00
Toby Jaffey
7e7cabeb24 Prettier, better terminal handling, more variation 2025-12-08 21:41:51 +00:00
Toby Jaffey
ebb6518ec3 Lissajous, showing floating point arithmetic 2025-12-08 21:20:57 +00:00
Toby Jaffey
6735b159ac Make syscall names closer to libc 2025-12-08 16:28:00 +00:00
Toby Jaffey
61fe0e8647 Rename ioreq to syscall 2025-12-08 12:26:47 +00:00