ברוך שוב – יו"ר ארגון הפרטיזנים – הלך לעולמו.
[עמוד הטוויטר של הפרויקט שלי
"וטרנים - גיבורי מלחה"ע ה-2":https://t.co/HGR3hGZ2RP]
ישנו צילום שאני שומר במגירה שלי ב-5 שנים האחרונות.
ביום הניצחון ה-70 על גרמניה הנאצית, פורסם בידיעות אחרונות צילום תחת הכותרת "תמונת הניצחון". >>
I’m excited to share that I’ll be joining OpenAI and look forward to working with the exceptional team there.
It was a difficult decision to move on. I’m incredibly proud of the amazing team at Google and everything we’ve built together. It has been an honor and a pleasure to work with all of you.
future sci-fi has become small talk.
on my team we are casually saying things, every single day, multiple sentences that would have sounded like pure sci-fi just 2 years ago.
@bcherny Hey @bcherny, just updated CC and tried to use voice, and got an "Unknown skill: voice" error 🥲
Any idea how to fix it? (I'm running CC in a Windows Terminal)
BTW, thanks for the epic stuff you're building.
Hi everyone,
Grand Theft Auto VI will now release on Thursday, November 19, 2026.
We are sorry for adding additional time to what we realize has been a long wait, but these extra months will allow us to finish the game with the level of polish you have come to expect and deserve.
I'm working, I'm working! Writing a bazillion unit tests for our new standalone HW accelerated linear algebra library for the Sega Dreamcast's SH4 based on the work I've done optimizing the physics, collision, and rendering math for our Grand Theft Auto 3 and Vice City DC ports.
So here's the deal. It has officially become too complex and error-prone to sit there and hand-optimize these routines in SH4 assembly then just load up the game on DC and hope my changes are all fully flexed and assume they're correct just based on not seeing any obvious glitches.
By pulling this work into a standalone library,
libSH4ZAM, I'm able to write unit tests to run on the actual physical Dreamcast console to validate all of this optimized math automatically... I even have an automated CI pipeline on the repo with a git push hook that will automatically turn on my Dreamcast, send unit tests to it, record results, and turn it back off when its done!
A standalone library will also let other DC homebrewers leverage my work to make FPS gainz within their own projects... so I'm inspired to continue drudging through these tests for the community...
ANYWAY, what we have here, is an example of the various layers of the SH4ZAM stack and how I'm unit testing. On the top left, we have two inline SH4 assembly "intrinsics," written to allow higher-level languages to leverage the "FIPR" (fast inner product) instruction on our CPU.
The top-left intrinsics are part of the C23 API, while the top right shows how I'm mapping that API to C++23, which provides namespacing, function overloading, operator overloading, generics (rather than macros), and a few other niceties.
ONE THING TO NOTE, THOUGH! C++ does not have any specific mechanism for declaring alias functions, so I've opted instead to simply to create function pointers to the C routines within the C++ namespace. Since they are declared CONSTEXPR, there's no function call indirection emitted from the compiler, since the functions can be resolved at compile-time... But be CAREFUL! IF YOU FORGET TO MAKE THE POINTERS CONST OR CONSTEXPR, RIP! Buh-bye zero-overhead C++ bindings!!!!
A SUBSTANTIAL amount of time is spent with Compiler Explorer open, validating that the C API incurs zero instruction overhead over the SH4 ASM intrinsics, and then I do it again, ensuring the C++ layer gets optimized away and compiled down into the same ASM as the C API.
The bottom right is a custom unit testing framework I wrote as part of my "libgimbal" cross-language/cross-platform extended stdlib framework, which allows me to do real unit testing on the DC (and anywhere else). You can see here that I've written several test cases to ensure that using the FIPR instruction provides a result that is approximately equal to performing a dot product yourself in C.
Since the C++ API is calling into and wrapping the C API, I've opted to just implement the unit tests in C++, because testing that API will flex both, so I can kill two birds with one stone...
...time to repeat this 99999 times for the rest of the API and then finish up the Doxygen!
https://t.co/QWLqwVrymp
Presenting sh4zam, a new hardware accelerated general math and linear algebra library for the Sega Dreamcast's SH4 CPU, providing the optimized routines developed for our Grand Theft Auto 3 and Vice City ports.
The plan was always to take what we created for GTA and bring it back home to the community at large... It's my hope that this library will allow for all DC developers to fully and efficiently harness the power of the SH4's FPU with their engines, games, and apps.
The library is split into 3 distinct layers, with the lowest layer being a collection of "intrinsics" written in (mostly inline) SH4 assembly. The intrinsics allow for efficient usage of the SIMD and fast-math instructions and provide access to the secondary bank of floating-point registers which holds the active 4x4 matrix... all concepts unknown to GCC.
The second layer is written in C23, with a series of structures provided for vectors, quaternions, and matrices, along with routines implementing their mathematical operations. You'll notice I have opted to both pass-by-value AND return-by-value here... which you would typically think would be a performance no-no...
Fortunately, we can force the compiler to inline these routines, which essentially optimizes away any copying of temporary variables to and from the stack, leaving us with an API that is both efficient AND ergonomic from C, with a high level of composability, since we can now chain calls into each other, passing the return value of one function as the argument to another... vastly superior than having to take each structure parameter by pointer.
Finally, we have a C++23 layer above that, within its own namespace, which simply extends the base C23 structures and implements their operations as a series of wrapper member functions. These wrapper functions also get optimized away by the compiler, but they allow for some modern C++ niceties like overloaded space-ship operators for lexicographical comparisons, overloaded subscript operators for array-like accesses, overloaded arithmetic operators for convenience, etc.
For C programmers, include the .h header files for the C23 API. For C++ programmers, include the .hpp header files for the C++23 API.
If anyone has any requests for math routines to be added to the API or for new operations that should be accelerated, please open a ticket. It's still very early, but I'm actively working on scoping out the entirety of the API and its features!
https://t.co/QWLqwVrymp
New blog post! A bug in GTA San Andreas lay dormant for over 20 years, until unrelated changes in Windows 11 24H2 triggered it. This is a deep dive into how a simple coding mistake erased all seaplanes from the game and made them completely unusable.
https://t.co/QT64SBvXPX
If you update WinDbg today (1.2504.15001.0), you might notice another icon in the View tab of the ribbon, one called "Parallel Stacks". While incredibly useful in its own right, this isn't just a parallel stacks view. It's the introduction of graph visualization for extensions!
we have greatly improved memory in chatgpt--it can now reference all your past conversations!
this is a surprisingly great feature imo, and it points at something we are excited about: ai systems that get to know you over your life, and become extremely useful and personalized.
FFmpeg makes extensive use of hand-written assembly code for huge (10-50x) speed increases and so we are providing assembly lessons to teach a new generation of assembly language programmers.
Learn more here:
https://t.co/u6MKBb3Xbk
FINALLY finishing up a MASSIVE PR from hell for the Sega Dreamcast port of Grand Theft Auto 3! This is an actual hardware capture now of the DC version under a high load, which would've previously been a slideshow, between the dynamic lighting from the sirens, the amount of rigid bodies in the physics simulation from the cars, and the high-speed chase placing high-demands on asset streaming...
I went through all of the low-level common math infrastructure in both the engine and at the RenderWare driver layer and made numerous optimizations, before slowly working my way up to optimizing individual algorithms at the application layer using the new math routines.
Firstly, the common low-level floating-point math routines for everything from trig and inverse square root operations to floor(), ceiling(), and clamp(), were replaced with what was meticulously found (in Compiler Explorer) to be the optimal patterns for GCC 14.2.0, targeting our SH architecture (sometimes favoring C builtins, sometimes inline SH4 ASM).
Next, in the layer above, with inline SH4 assembly, the common matrix math and linear algebra routines were accelerated using the Dreamcast's vector instructions. Some cleverness went down here, such as cramming matrix metadata into unused insignificant bits of an element, combining loading two matrices with multiplying them, fast transposes, fast quaternion multiplication using 4 dot products, etc.
Once the foundation was laid, some of the Renderware code such as the calculations for the lighting, updating bounding volumes, and deriving UV coordinates for specular environment maps on the cars was made faster automatically.
The main gainz were actually made rewriting a decent amount of the collision intersection and contact resolution code, though, from using C++-style overloaded operators for multiplying single 4D vectors by a 4x4 matrix to doing batches of 4D vectors by the same matrix.
This SUBSTANTIALLY reduced the number of times the backing 4x4 matrix bank had to be reloaded and allowed me to keep it resident within registers while it was being used by the intersection algorithms!
You might think it's just a game, but it's so much more!
Minesweeper was included to teach users how to right-click.
Solitaire was included to get people familiar with drag and drop.
Cardfile was included to familiarize people with MDI applications.
Paint was included for mouse dexterity, range selection, and more advanced mouse use.
Pinball was included just because it was cool.
Credit to @dsobeski for pointing it out!