summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add 0.18 update notes and bump zip timestampsHEADv0.18-BETAmasterGravatar Michael Smith 9 hours2-2/+6
|
* Support self-contained Windows compiler toolchainGravatar Michael Smith 20 hours2-10/+49
| | | | | | | | | | | | | | This will need to be accompanied by the publication of my toolchains repo at some point which has scripts to set up fixed versions of MSVC and LLVM, with way less space wasted than the official distributions thereof. Also that'll become necessary for a period of time until I figure out why LLVM 22 and 23 are unable to link SST now; we are stuck on 20 for the foreseeable future which makes having a self-contained thing quite helpful. This change also includes a couple of other build script improvements too, most notably debug builds without having to edit the damn script every time.
* Simplify gluegen one-based array macroGravatar Michael Smith 20 hours1-21/+22
| | | | | | | The SHUNT craziness I was doing triggers a warning with more recent Clang versions. Simply move the size into the macro to avoid the tentative definition abuse, which is probably less confusing (when combined with the new macro name, ARRAY) and also shuts the compiler up.
* Fix cvar value clamping not changing the stringGravatar Michael Smith 20 hours1-6/+8
| | | | | | | I believe this was a regression in the OE support added in 0.15, so it's been here a while. We don't have a lot of clamped cvars so I guess maybe nobody noticed for a while. I just happened to find it while testing other stuff. Quite a silly mistake but an easy fix.
* Abstract page allocation and locking in os.cGravatar Michael Smith 20 hours3-27/+64
| | | | Simplifies ac.c just a little bit.
* Add very basic speedrun demo record helperGravatar Michael Smith 20 hours5-2/+246
| | | | To be enhanced and extended later!
* Clean up a couple of random thingsGravatar Michael Smith 2026-04-042-2/+1
|
* Size-optimise cvar value cleanupGravatar Michael Smith 2026-04-045-22/+47
| | | | | | Put all the cvars together contiguously; then we don't need to generate lots of individual calls to extfree() and can instead simply iterate a fixed-sized array.
* Add extra contributor notes re copyright stuffGravatar Michael Smith 2026-04-041-0/+9
|
* Fix autojump on 4104 (Portal and HL2 episodes)Gravatar Michael Smith 2026-04-044-19/+26
|
* Don't bother with LTO in debug buildsGravatar Michael Smith 2026-04-042-8/+8
| | | | | There was never really much point in this, and it probably slowed things down a little bit, though not a lot.
* Fix a gluegen error message typoGravatar Michael Smith 2026-04-041-1/+1
|
* Size-optimise a little more, and tweak minor stuffGravatar Michael Smith 2026-04-046-30/+22
| | | | | | This isn't really making a difference right now but maybe it will in future builds with different section padding or LTO optimiser interactions or whatever.
* Tidy up very slightly dodgy l4dmm init edge caseGravatar Michael Smith 2026-04-041-6/+5
| | | | | Mostly only affects Linux, which doesn't even have a working build at the moment, but still, noticed it, might as well fix.
* Add PatchBot stuffGravatar Michael Smith 2026-04-046-0/+215
| | | | | | | | | | | | | | | | | | These are a little different than the ones we were using privately before and will require some one-off hopefully straightforward copy-pasting for existing developers. But hopefully this'll remove some friction from using the thing across the board. I'd still like to investigate smoother auth methods in the future. The SSH key idea seems like a good one, but there's some annoying obstacles there. There's also the idea of having the Discord bot send people tokens. For now, it's still just manual, which is probably good enough for quite a long time, to be honest. This also includes the Sorse Tecknoledgy Committy Discord link, because I've kind of not done well to advertise the existence of that thing. It has always been technically open the public, except many people probably don't know it's there.
* Make x86 library a little bit smaller againGravatar Michael Smith 2026-02-162-37/+127
|
* Do away with memcpy/memset/memcmpGravatar Michael Smith 2026-02-1624-142/+291
| | | | | | | | | | | | | | | | | | | | | Now everything is either explicitly a rep thing, or explicitly some other small run of reasonably efficient instructions. No library calls or function call overhead of any kind. Code size remains nice and small. Ban a few other bad libc functions while we're at it. More can be added later if we decide that's a useful idea. This will require some discipline and workarounds to cope with Clang's tendency to shove mem* calls in places you don't want them even when you tell it not to. Well, c'est la vie. I'm a little nervous that the __builtin_memmove() usage in shuntvars() could still one day emit actual library calls. It appears we're not importing memmove() from anywhere at the moment, though. So I guess it's good enough for now. Also I had to get rid of alloca() in con_.c but that was kind of bad anyway, so that's fine.
* Optimise midpoint hook assembly in l4d1democompatGravatar Michael Smith 2026-02-161-10/+12
|
* Move to static trampolines and type-safe hooksGravatar Michael Smith 2026-02-1621-459/+560
| | | | | | | | | | | | | | | | | For some reason the DLL got a tiny little bit bigger again but that's fine. This will make orig_ calls more efficient in the inline case, and also make it harder to screw up and hook the wrong thing by mistake. Self-explanatory-ish, apart from the fact it's a fairly large API change of course. And it relies on some more bonkers assembler directive hackery. But it works! The only complaint one might have is that the featsetup functions no longer take an explicit string which occasionally yields slightly less perfect error messages, but I've decided this isn't really a problem and makes the API nicer to use. It's a tradeoff, innit.
* Switch cmeta from chibicc to a new homegrown lexerGravatar Michael Smith 2026-02-1614-1737/+2717
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lexer is being written as a chunklet, not quite quite complete yet as it lacks some functionality to make it generally useful for things, but good enough for the gluegen use case now. So it's in the repo now and we can go ahead and use it for this instead of having this hacked-to-pieces third party thing that's nowhere near as efficient. In the future the goal is to have a decently usable library for any sort of C metaprogramming needs, not just within this project. This design does the data-oriented thing of storing as little about each token as possible (just 5 bytes), and re-lexing specific pieces only when necessary. In some cases, full validation of correct syntax is only possible through this secondary step. Since the use case is metaprogramming and code-generation rather than the reimplementation of Clang, this slight sloppiness in validation doesn't seem too bad. It's been a while since I did a proper performance measurement of this code but in some crude tests I did in the past the primary tokenisation step was running at well over 500MB/s, which is fast enough for me. It's possible that this version is a tiny bit slower due to the added complexity of making UCNs work. UCNs, incidentally, are one of the dumbest features of C by far. However, unlike trigraphs - which this lexer does not handle - UCNs are still in the language, so it's kind of sort of necessary to support them. It's probably still possible to come up with a faster design with some SIMD trickery, but the main loop is currently branchless and the lookup tables are too big for the SIMD lookup things, so that seems kind of hard. A separate SIMD path for whitespace or comment runs seems dubious as it would introduce branch mispredictions everywhere. I also made previous attempts to unroll the main loop and every attempt just made it slower, so I guess code size is a significant factor. Optimising the secondary tokenisation of identifiers (and later numerals and string/character literals once those are handled) is still on the cards, but since that happens less often, I don't know how much difference it'll make. At any rate, in a multithreaded context this thing would already come pretty close to SSD speeds, if open-read-close syscall overhead doesn't get in the way first. I imagine it's fast enough for anyone who hasn't *already* written something faster.
* Size-optimise a few thingsGravatar Michael Smith 2026-02-167-48/+79
| | | | | Saves multiple kilobytes, somehow. Unlikely to make much of a performance difference since it's mostly init/shutdown stuff.
* Move to a shared static RWX sectionGravatar Michael Smith 2026-02-1610-165/+172
| | | | | | | | | | | | | | Does away with the need to mark a region as executable on load. Also allows the self-modified stuff and hook trampolines to fit in the same page, so we take up ever-so-slightly less memory. Unfortunately I had issues getting the test binary to build correctly and eventually decided to give up as it wasn't testing much of value anyway. Also note that the build now allows for .c and .S files with the same basename, which required renaming the .o files, so you might want to clean out your .build/ directory before building this one.
* Use the correct rdata section nameGravatar Michael Smith 2025-12-131-1/+1
| | | | Saves 512 bytes of useless padding. Oops!
* Bump to 0.18Gravatar Michael Smith 2025-12-022-5/+4
|
* Set zip date for yet another releasev0.17-BETAGravatar Michael Smith 2025-12-011-2/+2
|
* Allow mutating argv in command callbacks and hooksGravatar Michael Smith 2025-12-013-26/+39
|
* Fix sst_mouse_factor always being hiddenGravatar Michael Smith 2025-11-283-2/+12
| | | | | Kind of unpleasant and probably something to revisit at some point to see if there's a more straightforward approach we can come up with.
* Prep 0.17, already!Gravatar Michael Smith 2025-11-252-5/+4
|
* Fix input HUD crash in L4D gamesv0.16-BETAGravatar Michael Smith 2025-11-254-2/+5
| | | | | | | | I screwed up merging Evan's changes, and also didn't have that one REQUIRE_GAMEDATA for some reason, and also didn't test actually turning on the sst_inputhud cvar once everything had loaded fine in testing. Unlucky, I guess. Better testing might still have caught it.
* Begin work on 0.16!Gravatar Michael Smith 2025-11-242-8/+4
|
* Do the release notes and zip dates for 0.15v0.15-BETAGravatar Michael Smith 2025-11-242-2/+5
|
* Fix inverted title case logicGravatar Michael Smith 2025-11-241-1/+1
| | | | Never tested until I started launching Half-Life 2, lol.
* Add offset for 4104 portal coloursGravatar Michael Smith 2025-11-241-2/+3
| | | | Thanks again to Evan Lin for finding this and sending a patch over.
* Turn x86 stuff into a chunklet to help out SPTGravatar Michael Smith 2025-11-2433-64/+119
| | | | Quick unused header cleanup pass while we're at it.
* Mark hidden stuff as unsupported in help textGravatar Michael Smith 2025-11-153-3/+18
|
* Deal with CON_HIDDEN not existing in OEGravatar Michael Smith 2025-11-159-89/+140
| | | | | Pretty hacky for now, but not the worst thing in the world. Can always be tidied up later.
* Fix incorrect gamedata short-circuitingGravatar Michael Smith 2025-11-151-1/+1
| | | | | | | | | | | Gamedata bugs are the gift that keeps on giving. This was making vgui stuff fail in L4D2 because the other outer conditions would match first. It's perhaps unfortunate that we have to remove short-circuiting in cases where it would work fine, but who knows, maybe the compiler would be smart enough to figure it out anyway. At any rate it's necessary for correctness, so whatever.
* Improve gamedata codegen and fix spurious casesGravatar Michael Smith 2025-10-119-43/+55
| | | | | The old GAMESPECIFIC mechanism had worked in practice but was technically a little bit incorrect, oops.
* Handle negated gamedata tag matches properlyGravatar Michael Smith 2025-10-114-19/+16
| | | | | | | The NE thing wasn't really correct, because it would match hypothetical cases where OE and some other tag bit are both set. Now we simply use !OE instead. The _GAMES_WITH inversion case is correct, because it doesn't necessarily exclude OE from being included too.
* Remove a superfluous includeGravatar Michael Smith 2025-10-051-1/+0
|
* Add SDK 2013 HUD supportGravatar Michael Smith 2025-10-053-10/+30
| | | | Gamedata values contributed by Evan Lin. Thanks!
* Fix OE dropping coloured logs early in startupGravatar Hayden K 2025-10-051-1/+21
| | | | | | | Not perfect, because if something fails extremely early, we won't see it, but that'll never be fully solvable. This is good enough to see what features succeed and fail in normal autoload conditions where we don't expect the plugin to blow up immediately.
* Fix deferred init in OEGravatar Michael Smith 2025-10-052-7/+17
| | | | | Not really sure what was going on here. This is just a workaround, really, but it works well enough for the time being.
* Get it sort-of-mostly working in "Old Engine" HL2Gravatar Michael Smith 2025-10-019-278/+603
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we're at it, come up with a way for certain gamedata matches to be Windows-only. Somewhat reduces ifdef usage, although does not entirely remove it of course. Tested in HL2 2707. Haven't tested other HL2 builds, or Episode 1. Doesn't seem to work in DMoMM yet either; not sure why. A big list of stuff still to fix follows. Hidden cvars are currently an issue. We still need to figure out what to do with the flag bits because FCVAR_HIDDEN just doesn't exist in OE and there's some other flag with the same value instead. We also need to do something about the flag setting in fixes.c since HIDDEN is again not a thing, and also DEVONLY is not a thing either. When the plugin is autoloaded, all the initial log text gets eaten, because there's some stupid crap we have to do to trick the engine into displaying coloured text otherwise it just won't. Not even stuff from Warning(). Very stupid, but Hayden already figured out a solution, so that'll be done in another upcoming commit. Apparently raw mouse input breaks the menu. We might need to bump up the priority on making that hook only be active when there's no UI open - something I wanted to do anyway due to the demo drive issues. Big thanks to Hayden for doing a lot of the initial groundwork on this, particularly the cvar registration stuff. He gets a copyright notice in con_.c even though I ended up doing a lot of stuff differently because quite a bit of his work is still in there. Don't blame him for the self-modifying code though, that was my crazy idea. Sorry, but, in my defence... Well, it works.
* Fix WinDbg init commands not running immediatelyGravatar Michael Smith 2025-09-292-2/+5
|
* Fix a bad error message in dbg.cGravatar Michael Smith 2025-09-291-1/+1
|
* Clean up some code style guide typosGravatar Michael Smith 2025-09-281-13/+13
| | | | Very important.
* Handle con_colourmsg this pointer inside con_.cGravatar Michael Smith 2025-08-102-27/+47
| | | | | | | | This is more prep for OE, as it will allow us to change how the call is forwarded for the other ABI (albeit in what looks like it'll be a fairly involved way) without requiring a bunch of extra code at every call site. It's maybe a little less efficient since the global has to be loaded every time, but coloured logging isn't exactly a bottleneck.
* Tidy up some extensions and remove some ifdefsGravatar Michael Smith 2025-08-037-30/+21
| | | | | | | | | | | | | | | | | | | | | Since this codebase is already extremely nonportable, I've decided to relax the obsessive ifdef-else-error usage around all the extensions. From now on, if there's no alternative to using an extension, we can just use that extension. If it's possible to do something in a relatively portable way, we can still try to do that in order to make the code somewhat reusable, in contexts where that makes sense. I also decided to use langext.h for naked functions and tail calls. If that's used in another codebase build with a different compiler, those just won't work, but that's fine. The benefit is really just that there's less ceremony in places where those are used, because it's likely there'll be a few more such places in the future, and it gets annoying reading all the double-underscore stuff all over the place. I still kind of want to do something about all the _WIN32 ifdefs too, but I've realised that doing so will lead to almost nothing actually being built on Linux. Then again, none of it currently runs on Linux so I guess that's a moot point. Will worry about it later, anyway.
* Use shorter spellings of __asm and __attributeGravatar Michael Smith 2025-08-039-20/+20
| | | | | | | Turns out, there's no need for the trailing underscores. Plus, glibc does some stupid stuff with __attribute__ for non-GCC compilers. Not that that matters here, but it seems like a good practice just to use the forms that never have such problems. And it's shorter too.