This tells me one of two things, either:
- Xbox Series S is an absolutely underrated beast and those devs who couldn't work on it were frauds
- PS5 Pro is a ridiculous scam that uses buzzwords to bring sheep in
Mr. SEGA Lives! retweeted
Holy SHIT!!! So I finally stopped hyper-analyzing and obsessing over micro-inefficiencies I was seeing in the SH4 assembly routines within Reshaped's Sonic Adventure 1 Remaster codebase for the Sega Dreamcast... and I just decided to build the goddamn thing and play it already.
...and oh. my. GOD!!! Sonic Adventure 1 is now running mostly at 60FPS (still some dips here and there, though), WITH FREAKING WIDESCREEN SUPPORT? Check out this direct hardware capture!
I never thought I'd see my SH4ZAM fast math library for the SH4 contribute to bringing GAINZ to a AAA Sega release like this that I grew up playing, but... here we are. Absolutely incredible.
Please support Reshaped's work by following on GitHub and starring the repo! He has done a fantastic job!
github.com/reshaped/sonic-ad…
EDIT: Yes, this is a repost. My original was uploaded at 30FPS, because... I'm an idiot. MY BAD! 🤣
Well, well, WELL! A buddy of mine is working on a remaster of Sonic Adventure 1 and 2 for the Sega Dreamcast, with SA1 already achieving mostly 60FPS with SH4ZAM acceleration, in addition to offering widescreen support and other goodies...
But what's interesting is that while his audacious clanker was clanking away at decompiling Sonic Adventure 2's Ninja-based matrix transform routines from the official Sega development kit, it clanked upon a PARTICULARLY juicy routine... a COMBINED translate, rotate, and scale transform operation, which gets applied to the 4x4 matrix held within the XMTRX FP register the back-bank.
The clanker even did one better. It rewrote the routine using INLINE assembly, so as to give the compiler extra context information on register utilization, so that a call to it won't have to pay the entire C ABI's worth of overhead to preserve and manage stack frame around registers that it never even clobbers to begin with.
But... the clanker, which had been told to favor SH4ZAM math routines for GAINZ wasn't wanting to listen for this particular transform. SURELY fusing the 3 operations together MUST be faster than applying them individually, with each one swapping the current FP register bank back and forth to operate on the XMTRX regs? So... is the clanker just LARPing here, or is this something that SH4ZAM can't currently compete with?
Well, at this point, I've literally done like 3 different passes micro optimizing my XMTRX TRS transform routines. I've also had some homies decompile, reverse engineer, and disassemble AAA Dreamcast games and compare them to mine to see if anything could beat them to find that SH4ZAM beat Shenmue and all the rest... except...
...the only exception was @JBrooksBSI's fucking GENIUS translate routine from World Series Baseball 2k2 that used a single FTRV instruction to do the math of applying a whole-ass 4x4 translation matrix into XMTRX.
The rest of the WSB2k2 transform routines tied with mine, but... thankfully John was kind enough to gift SH4ZAM that translate routine and a few other juicy routines (for scalar math approximations, in particlar), which were added to SH4ZAM release v0.10.0.
BUT ANYWAY, back to the story. How does a SINGLE fused transform routine from Sonic Adventure 2, which handled all 3 transforms at once, with the whole thing pipelined together, only ever swapping to the back-bank and back a single time, WITH additional clanker GAINZ, compare against SH4ZAM, which... to be honest... has no equivalent fused operation (yet)?
...it's 100% cycle-for-cycle the EXACT same speed (104 clock cycles) as the 3 separately chained SH4ZAM operations are, when the D-cache and I-cache are hot... and it fuckin' LOSES by a single clock cycle when the caches are cold... so basically... applying all 3 separately in SH4ZAM is superior to the single hand-optimized, clanker-LARPed, fused version from Sonic Adventure 2.
It's a one clock cycle win, but... GAAAAINZ!!!!
So... you can see why I've kind of dragged my feet creating the almighty "single fused TRS transform XMTRX" routine from hell... It's because nothing has beaten just combining my separate routines yet, and doing so is a royal PITA, lmfao.
But yeah, fine, I'll get off my ass and see if I can shave a few more cycles off... Surely just doing 4x less FRCHGs for swapping in and out of the back-bank will micro gain...
Mr. SEGA Lives! retweeted
Then and Now #SonicTheHedgehog #RougeTheBat













































