Commit Graph

356 Commits

Author SHA1 Message Date
Devine Lu Linvega 9530e7b13a Format 2024-09-19 14:14:05 -07:00
~d6 93125457a6 Update file_stat to match the existing documentation.
Previously, writing to the stat port would produce a line of text
similar to the listing used when reading a directory. This did not
match the documentation around the stat port.

After the change, writing an address to the stat port will fill that
address with bytes equal to the length parameter. These will either be
a hexadecimal file size, or else the same character repeated N times
according to the following logic:

 - path is a directory
 ? file size of path does not fit in N hexadecimal characters
 ! path is not readable

Note that unlike when reading a directory, the string will not include
the requested path, a newline, or a null terminator.
2024-09-19 14:05:55 -07:00
~d6 4ff6a5e862 Support creating directories
Previously Varvara did not have a way to create new directories.
This change adds that capability without adding or modifying any
device ports.

The changes are:

 (1) When a filename ends in the directory separator, writing
     any value to File/write will create a directory. Unlike
     with regular files, the value is ignored.

 (2) When writing any path (regular files or directories) if
     there are missing parent directories Varvara will attempt
     to create them first. This behavior is similar to mkdir -p.

The directory separator is / on most platforms, and \ on Windows.
On POSIX platforms the directories will be created with permission
0755 (modified by the user's umask value).

This change has been tested and works in both uxnemu and uxncli.
2024-09-17 18:09:32 -07:00
Devine Lu Linvega 7a42c338a8 Silenced errors, thanks Sigrid 2024-08-29 08:32:31 -07:00
Lobo Torres 36dd15a244 (uxn11) Add WM_CLASS hint to application window
This allows for programs like `xprop` and window managers to
recognize Uxn11 windows.
2024-08-28 08:58:56 -07:00
Devine Lu Linvega 67b06c35a4 Added linux subprocess API 2024-08-25 14:07:40 -07:00
Devine Lu Linvega 436e579df4 (uxnasm) Check against label/macro overlaps 2024-08-25 10:18:44 -07:00
Devine Lu Linvega 63f1cf68d1 (uxnasm) Fixed issue where some unused labels did not throw a warning 2024-08-25 10:05:15 -07:00
Devine Lu Linvega fc6328148d (uxn.c) Silenced warnings 2024-08-25 09:27:46 -07:00
Devine Lu Linvega 641170c4cb (uxn.c) Silenced warnings 2024-08-22 10:10:26 -07:00
Lobo Torres 8b8e51c55d (uxn11.c, uxncli.c) Exit after printing version on '-v' flag
Also bumps version in uxn11 and uxncli to today's date.
2024-08-18 15:49:16 -07:00
Lobo Torres e0be0f0af7 (uxn11.c) Remove bogus exit call in emu_end 2024-08-18 15:44:38 -07:00
Devine Lu Linvega 82c8651bcf (uxn.c) Temporary register does not need masking 2024-08-17 17:02:59 -07:00
Devine Lu Linvega 45c4d5a876 (uxn.c) Housekeeping 2024-08-17 16:58:06 -07:00
Devine Lu Linvega 91cd380632 (uxn.c) Housekeeping 2024-08-17 16:26:04 -07:00
Devine Lu Linvega d1268a850e Housekeeping 2024-08-17 12:40:45 -07:00
Devine Lu Linvega 3954e7b387 (uxn.c)Created macros for each reg 2024-08-17 12:10:25 -07:00
Devine Lu Linvega a98ba20d20 (uxn.c) Added micro opcode without assignment 2024-08-17 11:03:11 -07:00
Devine Lu Linvega b6d876ae4c (uxn.c) Renamed PR1 to PUR micro op 2024-08-17 10:23:37 -07:00
Devine Lu Linvega 4df6dd82cd (uxn.c) Separate macros for separate actions 2024-08-17 10:04:48 -07:00
Devine Lu Linvega 987b6521bb (uxn.c)Removed unnecessary macro 2024-08-17 10:01:01 -07:00
Devine Lu Linvega ab08601c0c (uxn.c) Use similar macro var names 2024-08-17 09:49:09 -07:00
Devine Lu Linvega 1478385e26 (uxn) Simplified PEK/POK microcode 2024-08-17 09:12:45 -07:00
Devine Lu Linvega 6096578a7b (uxn.c)PEK uses non-merging microcode 2024-08-16 20:30:00 -07:00
Devine Lu Linvega e4b4c2f8b0 (uxn.c) POK makes use of GET/PUT microcode 2024-08-16 20:25:50 -07:00
Devine Lu Linvega a277ae1142 Microcode that copies bytes in short without merging them 2024-08-16 20:13:41 -07:00
Devine Lu Linvega bffb31ccc8 Formatting 2024-08-16 19:33:23 -07:00
Devine Lu Linvega 4eac8853d6 (uxn.c)Removed scopes around macros 2024-08-13 11:04:04 -07:00
Devine Lu Linvega d27602d98a (uxn.c) Removed IMM macro for INC/DEC 2024-08-12 09:33:47 -07:00
Devine Lu Linvega 7b1e7b65fd (uxn.c) Do not set ptr via pointer 2024-08-12 08:34:08 -07:00
Devine Lu Linvega 2f032854b7 (uxn.c) The k value does not need masking 2024-08-12 07:50:57 -07:00
Devine Lu Linvega f4d74dcd48 (uxn) Removed sp* indirection 2024-08-12 07:41:22 -07:00
Devine Lu Linvega 90a5dad6bb Print 8 items on the stack 2024-08-11 13:29:06 -07:00
Devine Lu Linvega 7849662ac8 Use enum for flags, like uxn32 2024-08-05 15:06:05 -07:00
Devine Lu Linvega 8eae101486 Tiny change to macro arg order 2024-08-05 14:02:02 -07:00
Devine Lu Linvega 4f03030654 Fixed stack inspect debugger 2024-07-15 13:40:10 -07:00
Devine Lu Linvega b3f207b974 Moved unix specific console tools in etc 2024-07-15 11:47:24 -07:00
Devine Lu Linvega 6b335197da Standardized boot sequence 2024-07-15 11:42:00 -07:00
Devine Lu Linvega f6c66d53d1 Exit on F3 2024-07-15 11:26:38 -07:00
Devine Lu Linvega 0f7b483f22 Housekeeping 2024-07-15 11:15:21 -07:00
Devine Lu Linvega c3a54e415e Rolled back change to uxn core 2024-07-02 15:56:20 -08:00
Devine Lu Linvega c8b690921e (uxn.c) Housekeeping 2024-07-02 15:12:39 -08:00
Devine Lu Linvega 9af4cf2d05 (uxn.c) Let LITs fall through 2024-07-02 11:47:56 -08:00
Devine Lu Linvega 44c5e17aa2 (uxn.c) Housekeeping 2024-07-02 09:44:14 -08:00
Devine Lu Linvega 419ff65d83 (uxn.c) Housekeeping 2024-07-01 20:31:09 -08:00
Devine Lu Linvega a3d0fc88ce Unroll core 2024-07-01 20:00:24 -08:00
Devine Lu Linvega 8be4980fe3 Faster IMM opcodes 2024-07-01 17:04:09 -08:00
Devine Lu Linvega 72994b6d50 Use abc core 2024-07-01 16:42:36 -08:00
Devine Lu Linvega 3276f03ffe (uxn.c) Use small registers for SWP/DUP 2024-07-01 13:21:31 -08:00
Devine Lu Linvega 3b880b83cf (uxn.c) Remove T2_ macro for non-modifying transformations 2024-07-01 13:15:17 -08:00