Stefanos Kornilios Mitsis Poiitidis retweeted
🚨 #Driver 2 IS RUNNING ON #DREAMCAST! EXCLUSIVE FIRST GAMEPLAY!
We tested the "new port" of Driver 2 for Dreamcast—it’s fantastic! Created by my friend @PedroL55876
Check it out: youtu.be/LXgcO5ZHhOc?is=TuDg…
@falco_girgis @poiitidis @SEGAkatana @JiltedValkyrie @TheDCJunkyard
Stefanos Kornilios Mitsis Poiitidis retweeted
I'll talk about using spherical harmonics for thickness approximation today at #GPC26
//Definitely checkout this great overview of spherical harmonics by my good friend:
gpfault.net/posts/sph.html
lofty goal, fun times
Recomp-Framework is a static recompiler that turns Windows x86-64 and 32-bit Intel Mac games into native Apple Silicon apps.
The page states it translates PE and Mach-O executables ahead-of-time into C for arm64, with no emulation or Rosetta at runtime. Supports Vulkan and OpenGL via Metal, implements a Windows API surface, and includes Steam integration. Produces ordinary .app bundles that use the user’s own game data.
github.com/NightSightProduct…
#Recomp #AppleSilicon #StaticRecompilation
5
181
Stefanos Kornilios Mitsis Poiitidis retweeted
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...
Stefanos Kornilios Mitsis Poiitidis retweeted
My SH4DER-PVR water now working in Halo: Dreamcast Evolved with the godray sun and it runs great! I like how the effect looks here with the reflection and sub-surface scattering. Two different implementations of the water effect for two maps, so it quite customisable!
I've been doing research on the Dreamcast's PVR and found a solution to introduce subsurface scattering--or at least something that looks exactly like it. Here is a real hardware capture on Sega Dreamcast. Despite being a fixed-function GPU, there is a LOT more you can do with it than you think.
I've worked in visual effects for film and TV for almost 9 years now, so when I started thinking of the PowerVR chip as a supercharged compositing and layering suite (not unlike a living Photoshop), I started to get some real workhorse out of it.
Every wave, colour and reflection is computed on the console: rolling swells that move the actual geometry, fine ripples catching the light, a sky gradient fading into horizon fog, the sun reflected across the water, and wave crests that shadow the water behind them.
How it works:
The SH4 CPU builds the water every frame. Four sine swells, each travelling in its own direction, displace the water mesh. Three shorter waves only bend the surface normals, so you get fine ripple detail without adding triangles. Slopes come straight from the wave formulas, so neighbouring heights never need recalculating. Mesh rows are spaced evenly in screen depth rather than world distance, which puts detail where you can actually see it. Far away, ripples too small for the mesh to resolve fade out instead of shimmering. A small heightfield pass then checks which crests block the low sun and shades the water behind them. All of the maths goes through SH4ZAM, a maths library built around the SH-4's vector and fast-reciprocal instructions built by @falco_girgis.
I also had contributed by having Fable 5.2 Max Ultracode ("Lord SH4ZAM" as I call him) create additional SH4ZAM routines in a layered approach to find approaches to maths that Falco hasn't implemented yet:
1. shz_dce_project_vertices: a fast fused vertex routine where every row of the water's roughly 11,700 vertices goes through, with transform and screen projection in one pass.
2. shz_dce_vec3_normalize_safe: turns the view and sky directions into unit length.
The PowerVR2 GPU handles the look. The whole upper sky lives in one 512×512 texture, and each vertex's bent normal decides where the water reads from it. That means the sun's reflection streak forms out of the waves themselves rather than being painted on. A Fresnel term sets how much the water reflects versus shows its own colour: the PVR multiplies the sky texture by vertex colour for the reflection, then adds its "offset" colour for the deep-water tint and the light glowing through thin crests. The PVR's built-in fog table blends far water into the exact horizon colour between 55 m and 520 m, at no cost. The sky gradient is dithered when it's generated, so 16-bit colour doesn't band.
Where this could go:
Ocean and lake surfaces for racing, sailing, flight or island games, and big outdoor horizons, all at almost no disc space since the scene is generated. The crest-shadow trick works for terrain too, with hills shadowing valleys from a low sun. Building reflections from bent normals is a cheap way to fake environment reflections on fixed-function hardware.... but you will need to scope down the effects. Obviously, you would not run the water as heavy as I did (turn off SH4DOW-DC or limit its range), but I am pretty pleased with this result.
I pushed this to the limit for demonstration purposes to show what our little white console can do.
Stefanos Kornilios Mitsis Poiitidis retweeted
Real-time path tracing at just 1 SPP!
I've been integrating NVIDIA NRD into my path tracer, using REBLUR for diffuse/specular denoising and SIGMA for shadows.
Still a WIP, but here's a first look at the results!
Stefanos Kornilios Mitsis Poiitidis retweeted
24 hr progress on Ableton decompilation and port to Linux:
8.4% complete
About 30M tokens incinerated
~~~woorrkkfflloowsss~~~ cc @JiltedValkyrie
2
9
257
Replying to @falco_girgis
@falco_girgis wanna give github.com/skmp/shrike4-rtl a try for sh4zam? ask llm for help a bit barebones cc @JiltedValkyrie
2
14
398
Also nulldc3 is here github.com/skmp/nulldc3/pull…
5
51
Stefanos Kornilios Mitsis Poiitidis retweeted
Mizai.gr/maps
Κάτι που γίνεται πρώτη φορά στην Ελλάδα.
Και είναι shocking .
Stefanos Kornilios Mitsis Poiitidis retweeted
No, I never forgot about our Grand Theft Auto 3 and Vice City Sega Dreamcast ports, which never received the GAINZ from my SH4ZAM fast math library and are still missing some features.
Here’s a little teaser of the companion VMU minigame that our resident Sanyo LC86k assembly expert, @jvsTSX_, is coding up for GTA3!
Additional planned enhancements include mouse + keyboard PC controls, rumble/vibration force feedback, cheat code entry, and more!
Also hoping to clean up and upstream our custom Renderware driver back to @akero_p, who maintains the repo housing the modern day reincarnation of RW, which supports a host of other platforms.
The current plan is to revisit the codebase around Christmas when I will have more time during the holidays.
Feel free to beg other DC devs and GTA3/VC modders to get in on the action!
























