Загрузка видео...

Не удалось загрузить видео

На главную

FINALLY seeing my recent hard work on my accelerated linear algebra and math library, SH4ZAM, for the Sega Dreamcast pay off for our community infrastructure and libraries, holy shit. What you are seeing is two direct hardware captures of our Mario Kart 64 port running on actual DC hardware,...

29,743 просмотров • 4 месяцев назад •via X (Twitter)

Комментарии: 0

Нет доступных комментариев

Здесь появятся комментарии из оригинального поста

Похожие видео

Got something totally different, but exceptionally badass today to share! Here is a bunch of direct hardware captures of the (F)ixed (F)unction and (F)ast (F)ourier (T)ransform (T)esting audio visualization demos, running on my Sega Dreamcast! This incredible piece of science, engineering, art, and music started off as a crazy idea to port a bunch of GPU-based, Shadertoy audiovisual demos to the Sega Dreamcast, to play with combined digital signal processing and rendering on legacy fixed-function hardware. As you can see from the video, the FFFFTT repo includes a wide array of different demos, each providing different kinds of visualizations, each featuring different types of signal transformations and analyses, with many of them also being interactive, all done in real-time! Not only that, but you ALSO can freaking pause the playback and analyze the signals in real-time... crazy! The final resulting FFFFTT demos are an epic full-stack conglomeration of Ray's raylib, providing the backing infrastructure and graphics framework, which sits atop our GLdc driver for rendering, using David Reid's miniaudio library for sound playback, with its FFT and vector algebra accelerated for the SH4 CPU using my SH4ZAM math library... all ontop of KallistiOS, running on the Sega Dreamcast! Congratulations to meisei4 for the fantastic accomplishments, and a heart-felt thanks from me for bringing everything together to make this happen! You just laid the framework for some epic audio-based gameplay mechanics and other crazy science experiments in the future for whole community!

Falco Girgis

12,566 просмотров • 15 дней назад

This is a direct hardware capture of our Grand Theft Auto 3 port running on the Sega Dreamcast... which I'm still constantly receiving questions about to this day... So what's the deal? Do we ever plan to revisit it, or have we called it a day and moved on? What about all of these gainz that I keep posting about, surely they could be applied to our GTA3 and VC ports? The truth is... No, I'm not done. I constantly think about the day when SH4ZAM is ready to be pulled back into the codebase for what will hopefully be another round of epic gainz. GTA3 and VC on DC were probably the most exhilarating, satisfying projects I've ever worked on as an engineer--academically, professionally, and personally. SH4ZAM literally started out as hand-optimized inline ASM routines I was whipping out of my ass to optimize the physics and TnL for these ports... but I decided to extract the routines and develop SH4ZAM in isolation for a couple reasons: 1) I saw a gaping hole in the DC homebrew community and KallistiOS ecosystem, which prevented indie developers from truly harnessing the power of the DC's SH4 CPU and its epic FPU, due to us having no good generic software solution to democratize the hardware... I felt like my work on GTA3 and VC could help fill that void. 2) The linear algebra math and low level SH4 ASM was starting to get complex enough that continuing to work within the main game codebase when implementing these optimizations became unrealistic. It became too easy to break the game in obscure ways that weren't immediately apparent without playing the game for hours, which was not a very ideal workflow... I needed an isolated environment where I could rigorously unit test and profile my routines. In addition to SH4ZAM, though, there's all kinds of other stuff I wanted for the game... We have yet to implement mouse + keyboard support for the PC control scheme, also enabling players enter cheat codes. We had some cool goodies planned for the VMU, and we didn't support any rumble or haptic feedback either, just to name a few. Finally, we have one more super secret weapon we've kept hidden for many months now... A certain 3D modeling wizard, who goes by Andrea Lotito, has been working on asset-side gainz, by reducing polygonal complexity of pedestrian models among others, while astonishingly still managing to get EVEN MORE DETAIL out of the models as well?!

Falco Girgis

34,216 просмотров • 2 месяцев назад

jnmartin and I just spent the last 12 hours straight locked into an epic tag-team, binge-coding session. We've decided to return to perfect our port of Mario Kart 64 to the Sega Dreamcast, bringing with us all of the skills, knowledge, and tools at our disposal that we gained from every port we've been involved with since we originally released MK64 DC to the public. 1) jnmartin has just completely redone the audio synthesis and mixing code. It was originally emulating the Nintendo 64's RSP in software, on our CPU, and wound up being a total resource hog, despite us going to hell and back again, substantially boosting its performance by vectorizing it with our SH4 SIMD instructions. 2) Now that the audio is actually offloaded to the AICA, we can leverage its DSP to put back in effects such as reverb and echo that we simply didn't have the CPU budget to implement before... so the overall audio quality of the port will be SIGNIFICANTLY improved. 3) jnmartin has been working on many small bugfixes, such as the near-Z clipping edge-cases that would cause corrupted triangles to draw over the players' screens sometimes in 3 and 4 player modes. 4) jnmartin just kicked GLdc--our OpenGL 1.1 driver, built atop of KallistiOS--to the curb and has instead implemented a bare-metal renderer that raw-dogs KOS's lowest-level PVR GPU driver directly, giving us more control and better performance within the renderer. 4) I just implemented support for playing with the Sega Dreamcast keyboard peripheral as a controller, partially as a flex, and partially because jnmartin kept complaining that he only had 3 controllers for testing... 🤣 4) I have taken my entire accelerated math and linear algebra library, SH4ZAM--which was born just after this port was originally released--back with me this time and am optimizing every freaking thing I can get my hands on with it. Every matrix multiplication, vector transform, memcpy-call, and scalar or trig routine is getting swapped out for the corresponding hand-optimized, meticulously benchmarked, and rigorously unit-tested equivalent within SH4ZAM, which now ships as part of kos-ports. As you can see from this series of direct hardware captures, overlaid with the terminal window which was capturing the FPS logging reports from my actual Sega Dreamcast, the performance is now SIGNIFICANTLY better than it was previously, and it already ran on-par or slightly better than the N64 original under most circumstances! Sooo many GAINZ to be had! 💪

Falco Girgis

12,615 просмотров • 9 дней назад

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!

Falco Girgis

114,524 просмотров • 1 год назад

With all of the excitement from Mario Kart 64 coming to the Sega Dreamcast, I've been getting bombarded with questions about whether any more progress has been made on our Mario 64 port... so here's a direct hardware capture of the latest build running on DC! The answer: HELL YES! Last time most people saw or played this port, it was plagued with performance, audio, and graphical issues... but as you can see from this footage, almost all of them have been resolved, and she's playing like a dream on the DC now! Wtf happened? Well, first of all, in the 5 years since the port initially started, I, along with others, such as UnknownShadow, have made progress optimizing and improving upon our OpenGL 1.2 driver, "GLdc," which drastically improved the overall performance of the port by decreasing the amount of time the Dreamcast's SH4 CPU spent on T&L, processing polygons. Next, chad developer, Bruce (or Bruck or Brucilicious, depending on who you are), went through and applied a bunch of bugfix patches from the upstream repo to the game to fix the majority of the graphical glitches such as clipping issues and Mario's iconic biker mustache from the previous releases (despite me trying to convince him to keep that one, as it's become a Dreamcast trademark). Finally, the original developer behind both the Sega Dreamcast and Sony PSP ports, MrNeo, has returned from hiatus and has begun redoing the audio engine to fix the artifacting and stuttering! Stay tuned for further updates and the inevitable rerelease of this N64 classic on Sega's finest little white box that still refuses to die!

Falco Girgis

34,186 просмотров • 1 год назад

Been up almost the entire night making big audio gainz on the SH4 CPU for the Sega Dreamcast port of Mario Kart 64! It took about 3 of us pitching ideas and optimizing together, but holy shit, the 200Mhz SH4 is keeping up 99% of the time doing all synthesis and mixing in SW! What you're seeing is the first hardware capture of Mario Kart 64 running on the Sega Dreamcast with working audio playback... and trust me, it was not easy to get here! First of all, all of the audio signal processing for synthesizing individual notes from sampling instruments then mixing the SFX channels and the BGM together into a single audio stream is being done completely in SW on the DC's 200Mhz SH4 CPU--while it was done in HW on the N64. It is also carrying the whole T&L load for rendering with extra overhead per draw call due to us using our OpenGL 1.1 driver for graphics (GLdc). You can currently see a teeny little bit of slowdown at the beginning of the race when all 8 karts are bunched together, emitting their own SFX, which all has to get mixed in SW, bogging down the CPU... but don't worry, plenty of gainz left! On the left is a very interesting routine which proved to be incredibly gainzy when accelerated... So lets jump into what we did to this "aResampleImpl()" routine! 1) Compiler Optimizations: Everything is compiled with -Os by default to save RAM, because jnmartin is preloading almost everything up-front; however, we've created a "hot file" listing within the Makefile which allows us to build specific perf-critical translation units at with the -O3 optimization flag. 2) Manually managing the data cache: notice how many prefetches and barriers are in this routine in order to phenangle GCC's codegen to be somewhat similar to the ordering we've done things in C. Additionally, I've gone through hell in Compiler Explorer to ensure that all of the buffers used here can be prefetched in a timely manner, so that they're cache-resident before they're actually used. 3) SIMD: While we were discussing this routine in Discord, Paul noticed that the sample calculation was essentially performing a dot product of 2 4D vectors... which... GUESS WHAT. The SH4's FPU can do with a single instruction, FTRV, which is what "shz_dot8f()" provides an intrinsic around... The gainz were pretty substantial, despite having to convert back and forth between int16_t and floats. The new FP SIMD code can be enabled with "SH4_SIMD_GAINZ," otherwise the slow integer path is taken, so you can see the code difference. 4) Custom memcpy() routines: The builtin memcpy() routine that we're given in GCC15 from Newlib for the SuperH architecture is EXTREMELY slow... about as slow as copying byte-by-byte in ASM, so doing any sort of multi-byte loads and stores (provided adequately aligned buffers), even in C code, offers substantial gainz. Anyway, that's it for today! Stay tuned for more gainz!

Falco Girgis

15,547 просмотров • 11 месяцев назад

JNMARTIN HAS BROUGHT US CHRISTMAS EARLY THIS YEAR!!! His port of Star Fox 64 to the Sega Dreamcast is officially complete and was just released! Here's 9+ minutes of spliced direct hardware captures, featuring footage from every mission running on an actual physical DC at 480p! I have to say, the game feels incredibly smooth and responsive on the DC and controls extremely well. Also... as you can see, at twice the resolution with progressive scan, she looks gorgeous even with my cheap-ass HDMI cables and USB capture card. While jnmartin had the game up and running on DC within (literally) 2 days, there was an enormous amount of time and energy invested into faithfully recreating the experience graphically, implementing various bugfixes, and hunting for performance gainz... the man has never been satisfied with anything short of amazing with his ports, and it really shows. Like his Mario Kart 64 port, Star Fox 64 is also using my SH4ZAM library to hardware accelerate the math and linear algebra routines for DC; however, unlike last time, he's gotten so good at performance gainz that I barely did anything at all on that side, other than writing a few little inline SH4 ASM routines to cover some operations that I didn't already accelerate within the API... Suffice to say, though, that everything from the vertex TnL pipeline, to audio decoding, to gameplay-related trigonometry routines has been optimized for the SH4's FPU... jnmartin even got to bust out the SH4's MMU to accelerate the translation of of the segmented address scheme used by the game on N64 (which was apparently some suggested memory management model in the N64 docs) into the DC's virtual address space--which previously had to be done in software... So even more gainz! Sorry, though... but pretty sure this is why the game won't work in the Flycast emulator currently... whoops! 🤣 Shout-out to darcagent for contributing DREAMCAST RUMBLE PACK SUPPORT (among other things) to the release. Rumble support has historically been a pain-point within our KallistiOS homebrew DC SDK, as many 3rd party rumble packs are non-compliant and either do what they want with certain rumble commands or screw up the entire maple bus when they receive something they have decided not to fully implement... Great job getting that shit sorted out and tested with so many packs. All of my exotic (and cheapo) 3rd party rumble devices that I was able to test with seemed to work great! Finally, lets give SonicDcer a round of applause for being the lead dude behind the original N64 decompilation--as it was his original work that allowed for any of this to even be possible. He also continued to offer support and advice throughout the entire porting process, like a total chad. Here's the link to the official GitHub repo with instructions for building a Dreamcast image from a StarFox N64 ROM:

Falco Girgis

30,965 просмотров • 7 месяцев назад

SHE'S DONE!!! Mario Kart 64 for the Sega Dreamcast is officially ready for public consumption, so here's a full 6+ minute video of gameplay, captured straight from my actual DC! Jnmartin has done it again! The footage you are watching shows every GP course in the game, including multiplayer footage as well. Yes, you can also save and load ghost files from the VMU! As this is our first release, I'm sure you will run into a minor bug here or there, especially given neither one of us could stress test 4 player very effectively using our hands and feet to drive... So be sure to open tickets for any minor issues you find... assuming you're playing on REAL HARDWARE. I can already tell you right now, emulators are having issues with this one! This was my first time getting to directly contribute to a jnmartin N64 port, and it was an absolute honor for me to be involved with his incredible work. There is nobody else who I have ever met with the cross-architecture knowledge of BOTH the Sega Dreamcast and Nintendo 64, combined with the raw grit, tenacity, and attention to detail required to pull this off and do the source material justice. Not only did I get to take my SH4ZAM library for DC math gainz out for a ride with MK64, but I also brought some new routines back from MK64 so everyone can use them! Finally, I got to be involved in laying the foundation for future jnmartin N64 ports, now that we have an optimized, accelerated audio and video back-end for various libultra functionality, including Fast3D. You can already see how much this has benefited future work based on how quickly jnmartin was able to get StarFox 64 up and running on DC... The man doesn't sleep, no. lol. I just wanted to thank everyone so much for the continued enthusiasm and support behind these ports. The support for our work and the Sega Dreamcast means the world to us! Thanks for helping to keep the dream alive! For instructions on how to build yourself a burnable CDI image or a DreamShell ISO for either your DC's SD card or IDE drive, please follow the README on the repository: NOTE: Windows users will need DreamSDK to build. My last-minute build fixes for DreamSDK are in this WIP branch here, which will probably be merged into the main branch tomorrow when jnmartin wakes up:

Falco Girgis

63,174 просмотров • 10 месяцев назад