Commit Graph

352 Commits

Author SHA1 Message Date
shorekeeper
d41e110cdf Fix some GPU bugs and add clamping 2026-04-03 00:44:00 +03:00
3e5a979331 2 more coding rules 2026-04-02 23:30:20 +02:00
a2069eea74 minor tweaks 2026-04-02 21:26:38 +02:00
97a2e34f2e realtime clock 2026-04-02 15:37:01 +02:00
ac2a05efdb MSVC is horrendous 2026-04-02 15:19:51 +02:00
19cfedc112 trying to revive submodule 2026-04-02 11:06:35 +02:00
a6a31d2b64 that wasnt meant to be there 2026-04-02 10:57:48 +02:00
ed745517af Merge branch 'main' of https://github.com/NeoFlock/neonucleus 2026-04-02 10:53:25 +02:00
5e53ae1f86 merge 2026-04-02 10:49:50 +02:00
0dd62a8806 merge 2026-04-02 10:48:20 +02:00
e66b11c5c3 updated readme 2026-04-02 10:46:41 +02:00
13fc83b20b we now have a coding guide 2026-04-01 19:45:59 +02:00
Quantum Tomato
fd9aba2812 Merge pull request #25 from shorekeeper/main
Fix Windows build and several cross-platform bugs
2026-04-01 18:40:28 +02:00
shorekeeper
3943b7d584 push unicode changes lol 2026-04-01 19:28:15 +03:00
shorekeeper
8d37628ae7 Fix Windows build and several cross-platform bugs
Cross-platform bugs:

- ncomplib.c: fseek was called as fseek(f, whence, offset) instead of
  fseek(f, offset, whence). Seeks only worked correctly when offset
  happened to numerically equal a valid whence constant.

- neonucleus.c: nn_realloc passed memory pointer instead of ctx to
  nn_alloc in the NULL and sentinel paths. Any call with memory=NULL
  dereferences NULL as a context struct and crashes. Confirmed by
  test_realloc.c which crashes before fix and passes after.

- neonucleus.h: NN_TiB was defined as (1024 * NN_TiB), referencing
  itself. Fixed to ((size_t)1024 * NN_GiB).

- luaarch.c: unicode functions were registered on the component Lua
  table instead of the unicode table. Wrong stack index variable was
  used in all five lua_setfield calls.

- neonucleus.c: NN_ATOMIC_NONE versions of nn_incRef/nn_decRef took
  1 argument but were called with 2 everywhere. Added the missing
  size_t n parameter.

Windows build:

- neonucleus.c: NN_LOCK_CREATE in NN_THREAD_WINDOWS was missing a
  return statement, falling through into NN_LOCK_DESTROY and
  immediately closing the freshly created mutex handle.

- ncomplib.c: Added Windows implementations for opendir, readdir,
  closedir, stat, mkdir and directory removal using FindFirstFileA,
  FindNextFileA, _stat, _mkdir and _rmdir.

- main.c: Fall back to USERNAME env var when USER is not set.

- neonucleus.h: Added NN_VLA macro. Expands to a plain VLA on
  GCC/Clang, uses _alloca on MSVC. Applied in luaarch.c and
  neonucleus.c where VLAs were used.

- neonucleus.h: Added NN_INIT macro. Expands to a compound literal
  cast on GCC/Clang, expands to nothing on MSVC which does not
  support compound literals as constant initializers at file scope.
  Applied to all global struct initializers in neonucleus.c.

- neonucleus.c: Auto-define NN_ATOMIC_NONE on MSVC in C mode since
  MSVC does not provide stdatomic.h outside of C++ mode.
2026-04-01 19:18:00 +03:00
3f6ef63737 small rework 2026-04-01 14:40:12 +02:00
d95726cbf6 slight bugfix and work on drive 2026-04-01 12:34:57 +02:00
9f6b22cdcf followed the law 2026-04-01 11:22:19 +02:00
b0afd0529e forgot to commit openos 2026-04-01 11:04:22 +02:00
9291d81d41 small tweak 2026-03-31 18:54:19 +02:00
2a31dc838d perfectly accurate fs
turns out, file cost is 0 for loot disks, so there was never an actual
discrepancy
2026-03-31 18:00:18 +02:00
917427c2e1 initial work on GPU 2026-03-31 14:43:10 +02:00
76b14524c5 more work on FS 2026-03-31 13:13:11 +02:00
5c854e5c4a extremely primitive screen impl 2026-03-30 23:25:56 +02:00
6086208879 more complete fs impl 2026-03-30 18:05:16 +02:00
2b72e47ba5 mkdir 2026-03-30 11:42:28 +02:00
ad76ae2375 completed veeprom implementation 2026-03-30 11:22:20 +02:00
b39e379e95 eeprom stuff 2026-03-29 23:23:38 +02:00
d7ca929a5f a useful option 2026-03-29 20:31:58 +02:00
37cc73a21c huge progress on ncomplib 2026-03-29 19:50:16 +02:00
f722108806 Merge branch 'main' of https://github.com/NeoFlock/neonucleus 2026-03-28 22:43:04 +01:00
30547b2dc8 reworking a large part of the architecture 2026-03-28 22:38:00 +01:00
a95b233c68 basic changes 2026-03-23 11:41:39 +01:00
d5622d8009 bugfixes 2026-03-19 18:58:29 +01:00
1a6a008331 minor fixes 2026-03-19 18:48:58 +01:00
b1fc23ab5a made the default call budget more realistic 2026-03-19 16:43:39 +01:00
a6b5a52723 made it match OC more 2026-03-19 16:34:55 +01:00
e2c30afde5 made the API more complete 2026-03-19 16:33:24 +01:00
f1c7fe6cdf small fix 2026-03-19 10:23:41 +01:00
aaa91a8d94 bugfix 2026-03-18 20:18:28 +01:00
23e02652d7 strcmp warfare 2026-03-18 18:57:06 +01:00
3045a86cd9 fixed simplifyPath 2026-03-16 21:57:18 +01:00
841241833d hashmapification 2026-03-16 12:48:37 +01:00
bb1307900a initial work on a hashmap 2026-03-16 00:36:03 +01:00
83fd3ba2c8 some stuff 2026-03-15 22:51:09 +01:00
9c1062c076 bugfixes and a temporary optimization
indirect is way too aggressive. It needs to be reworked
2026-03-15 22:32:35 +01:00
dd97929a04 TODO is now up-to-date 2026-03-15 18:32:55 +01:00
59f7dd1492 erase the old version 2026-03-15 18:22:01 +01:00
dcafbd3e21 drive labels 2026-02-26 11:40:22 +01:00
4316cc57d3 small changes 2026-02-25 09:56:20 +01:00