sh4's Avatar

sh4

@sh4.dev

Dreamcast GPU Researcher, FPGA, Emulation, Optimization, Math, Music https://x.com/sh4forever https://sh4.dev/dragon/architecture/

46
Followers
8
Following
19
Posts
12.11.2024
Joined
Posts Following

Latest posts by sh4 @sh4.dev

If you've seen something on a line but now you don't, because the triangle is convex you're sure it can't show up again for the rest of the line, so we will be able to just skip empty space to the next row. To be clear, it's not in place in this video, it's coming soon!

02.04.2025 18:37 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

This is a simulation of our own custom hardware so we are defining our own hardware and shading language and everything. The rasterization algorithm is pretty classic Pineda stuff from late 80s and as we're scanning across the line we can track if we have seen something so far.

02.04.2025 18:37 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Video thumbnail

Sharing a fun visualization of what the early shader-based rasterizer on our custom #gpu looks like in-simulator. Threads walk over the bounding box area of a triangle. Next optimization here is: on a row, if you have seen some pixels and now you don't, skip to next row. #fpga #emulator

02.04.2025 17:35 ๐Ÿ‘ 3 ๐Ÿ” 1 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Maybe, but I'm probably not the person to figure it out? I don't have a deep understanding of how SC1's code works, just the console.

23.01.2025 04:07 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

what's this!? You're on bsky?!

13.01.2025 18:16 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Video thumbnail

More progress on #webgpu #dreamcast GPU simulation. This is opaque list-only rendering with just base colors (no texturing). You can see how Soul Calibur would multiply these base colors with albedo texture to produce per-vertex lighting. Progress!

03.12.2024 16:56 ๐Ÿ‘ 18 ๐Ÿ” 6 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Holy dooly. Never heard of that. Thanks for the PSA :)

02.12.2024 23:09 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Video thumbnail

#webgpu -based simulation of the #dreamcast PowerVR GPU is making progress slowly. The entire ISP/TSP processing of lists is done via compute shader. The shader walks over TA-generated data structures in dreamcast VRAM. Stutters are understood and will be fixed. PROGRESS!!

02.12.2024 23:05 ๐Ÿ‘ 4 ๐Ÿ” 1 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Penguin has its own custom JIT which performs optimization passes on both SH4 and ARM7DI guest instructions. We emit code for both x86_64 and aarch64. I am currently writing a webgpu-based simulation of the powervr GPU which should have excellent accuracy and even be useful in other emulators.

01.12.2024 19:09 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Post image Post image Post image

Here you can see some breakdown of how cell shading works in Jet Grind Radio. Body parts are drawn twice, with the second one drawn completely black and "expanded" size, with all screen space depth values moved away from the camera to give the appearance of an outline. Maybe I should make a video...

01.12.2024 19:09 ๐Ÿ‘ 4 ๐Ÿ” 1 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 1

The "Penguin" project, a #dreamcast #emulator collaboration between myself and uchinokitsune for many years at this point is nearly in a release-able state. It is neither the most accurate nor fastest emulator, but has /many/ tools for inspecting and debugging games.

01.12.2024 19:09 ๐Ÿ‘ 4 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
ROUGH DRAFT : The Dreamcast GPU (Part 1)
ROUGH DRAFT : The Dreamcast GPU (Part 1) YouTube video by sh4

www.youtube.com/watch?v=OaIa...
Re-sharing the rough first take on the #dreamcast #gpu #powervr internals. Goes over tiled rendering, the Tile Accelerator, and basic PowerVR ISP/TSP operations.

Because of "life", it will still be a few weeks until I can have a cleaned up version of this out.

01.12.2024 18:58 ๐Ÿ‘ 4 ๐Ÿ” 1 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 1
Preview
GitHub - gh-sh4/bloggg Contribute to gh-sh4/bloggg development by creating an account on GitHub.

I got tired of figuring out markdown site generators that didn't quite do what I want, so I just made my own in like <200 lines of python.

sh4.dev is made of
github.com/gh-sh4/bloggg < tool
github.com/gh-sh4/sh4.d... < site

It's ugly as sin right now, will update the template CSS later ๐Ÿ˜

01.12.2024 18:56 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Our GPU command buffers are written to system memory and pulled by the GPU on-demand. You can see in the screenshot that we also have debugging-related pseudo-commands in the buffer stream which the emulator show to help with debugging. #gpudev #emulator

01.12.2024 18:05 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Post image

Additionally, we have our own pipelined RISCV implementation now which is substantially faster and more fully-featured than the excellent picorv32 we were using before. Pictured here, we also created an emulator which can simulate the CPU and GPU at a very low level.

01.12.2024 18:05 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Video thumbnail

Sharing here the first on-FPGA triangle we rendered. This was some time ago, and we have performed significant pipelining optimizations to the design at this point. Rasterization can be easily parallelized. It's based on a moving grid of rasterizers based on Pineda-style edge-equations.

01.12.2024 18:01 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Dragon

Threads to catch up existing projects:
sh4.dev/dragon/ is the product of myself and uchinokitsune developing a "new" fantasy console in #verilog for use on real #fpga. We design the hardware, all software, and games. Currently still deep into GPU development. Architecture notes in the link

01.12.2024 17:58 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 0

Hello everyone! I was previously on Twitter/X, left because it's a bit of a dumpster fire at this point. I post on FPGA, emulation, retro gaming, low level optimization, maybe sometimes music.

01.12.2024 17:51 ๐Ÿ‘ 5 ๐Ÿ” 1 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 1

I have developed for both FPGAs and spent years writing emulators. What you said later is true: both have their pros and cons (like almost everything). FPGAs can have effectively zero latency and interact with real hardware. Emulators can do a much wider range of things and reach a wider audience.

01.12.2024 17:45 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0