[HN Gopher] Quake on an FPGA (MRISC32 CPU) [video]
___________________________________________________________________
Quake on an FPGA (MRISC32 CPU) [video]
Author : mbitsnbites
Score : 71 points
Date : 2024-01-17 16:03 UTC (6 hours ago)
(HTM) web link (vimeo.com)
(TXT) w3m dump (vimeo.com)
| lightedman wrote:
| This is interesting and makes me wonder how long it will be
| before we see older games made natively in hardware alone.
| mbitsnbites wrote:
| That would be closing the circle. Back in the 1970's some video
| games were more or less purely implemented in hardware (e.g. I
| believe Pong was originally implemented with discrete TTL
| chips, and a later hone version was implemented in a single
| VLSI chip).
| xcv123 wrote:
| That's right. All of the early arcade games used TTL discrete
| logic.
|
| The first arcade game implemented with a microprocessor was
| released in 1975
|
| https://en.wikipedia.org/wiki/Gun_Fight
| rbanffy wrote:
| This is a softcore running a Quake port. Cool, but not quite
| what you want.
| thot_experiment wrote:
| Don't get me wrong, this is very fucking cool. I have long
| yearned for a world where an FPGA PCIe add-in card is something
| practically useful and every year I gain a bit of hope that we're
| slowly plodding along toward that future.
|
| But what I really want to see is quake running on quake specific
| hardware, with everything burned into the logic elements running
| at some thousands of FPS, rather than quake running on a
| softcore.
|
| While we're on the subject, the real thing that's holding back
| broader adoption of FPGA programming is the fucking tooling. I
| cannot wait till we have something FOSS like clang/gcc for
| verilog/vhdl that can be reasonably relied upon. Quartus is...
| quartus is something else.
|
| (ok maybe the real thing holding back adoption is that it's
| extremely fucking niche that you actually _need_ FPGA latency,
| but let me dream)
| beebeepka wrote:
| Love the idea of Quake specific hardware. We're still a few
| years away from having 1khz oled (or faster) displays but i am
| sure they'll arrive by the time I won't be able to make use of
| them due to old age. But I want to see it.
|
| If course, all that goodness would be for nothing if we don't
| bake a proper version of the game. It's been a while but I
| think Quake server tickrate is likely to be on the low side.
|
| Quick searching confirms that. From
| https://speeddemosarchive.com/quake/qdq/articles/WallHug/fra...
|
| "In normal Quake, the server framerate is controlled by a
| console variable called sys_ticrate. This measures the amount
| of time each frame should last, and its default value is 0.05
| (that is, twenty frames per second.) Most server administrators
| don't bother to change this."
|
| I say someone should take your idea, fix Quake 3 to run at 1khz
| on both the client and the server, then bake that into fpga. I
| would buy it
| rbanffy wrote:
| > We're still a few years away from having 1khz oled (or
| faster) displays
|
| Fine. We can always go with 240 fps AR with 8K HDR 180-degree
| FoV instead.
| hypercube33 wrote:
| How would mods work? That's half the fun of quake...I suppose
| since quakevm itself is open source maybe run that on
| hardware and allow software extensions.
| shrewduser wrote:
| surely we could already do 1khz displays with OLED, but i
| assumed that the bandwidth required to meet that wouldn't be
| available on any of todays display outputs.
| ErneX wrote:
| True, LG is releasing OLED monitors this year that reach
| 480hz but at 1080p (240hz at 4K).
| mbitsnbites wrote:
| There are efforts to bring FOSS FPGA tooling. Check out Yosys
| (still far from as mature as LLVM though). But yes, I agree...
| mentos wrote:
| Ha I came here to ask about the potential for this and its the
| top comment.
|
| Is there a name for this that I can search for more info on?
|
| Could Windows/macOS one day ship on an FPGA like this?
| mbitsnbites wrote:
| Realistically: No that won't happen (sorry to disappoint
| you).
|
| There are some niche demos, like a HW raytracer on an FPGA,
| but full systems is not realistic. General purpose code
| simply is a bad match for FPGAs.
| mbitsnbites wrote:
| So I realize that the title is slightly misleading. It's
| obviously not a pure hardware implementation of Quake, but
| rather the original Quake software renderer running on a custom
| soft processor in an FPGA.
|
| I like to use it as a benchmark while developing the CPU. E.g
| cache performance and branch predictor performance is so much
| more interesting in the context of a full game, rather than
| some boring synthetic benchmark.
|
| The reason for the title, though, is that I have not seen many
| instances of Quake running on an FPGA, in any form (Doom is
| fairly common, but not Quake).
|
| However there area few interesting projects on the aame theme:
|
| * Quake level viewer with a custom GPU and a RISC-V soft
| processor:
| https://twitter.com/sylefeb/status/1564758778830065666
|
| * A pretty fast general purpose GPU on an FPGA that can display
| Quake (FuryGPU): https://www.youtube.com/@dbarrie/videos
| PfhorSlayer wrote:
| Hey! I'm the developer of the FuryGPU, and it's very cool to
| see others working in a similar space - Doom is neat but
| Quake is where 3D graphics really came into their own.
|
| For anyone curious, FuryGPU is a full mid-90s-era GPU built
| from the ground up which covers the entire stack of both
| hardware and software development. I designed a custom PCB to
| expose the PCIe lanes on the Kria K26 (Zynq UltraScale+) FPGA
| and allow for fast host-GPU communication, built and
| optimized the actual GPU hardware, wrote both an entirely
| custom graphics API to drive it as well as Windows drivers to
| have the OS interact with the hardware correctly, and finally
| ported Quake to that new API. It's been about three years of
| work and is still my first and only FPGA project.
|
| Once everything is "finished," I do plan on open-sourcing the
| project. When and what that will look like depends on a lot
| of factors, but I've nearly ticked all the boxes I set for
| myself originally so it probably won't be too far in the
| future.
|
| Thanks for the plug!
| unsigner wrote:
| That's amazing!
|
| What does the API look like? I see you're calling it FuryGL
| so it must have some roots in OpenGL? What did you have to
| change because of the underlying hardware? compared to
| OpenGL? Compared to what a software rasterizer API would
| look like? You probably are familiar with Glide?
| corysama wrote:
| In the mean time, there's the FPGA "DOOM chip"
|
| https://github.com/sylefeb/Silice/blob/master/projects/doomc...
|
| https://www.youtube.com/watch?v=2ZAIIDXoBis
| bee_rider wrote:
| Even an old program like Quake has many lines of code, right?
| Maybe a more plausible setup could be softcore+Quake specific
| instructions? Plus the author will get to write their own fast
| approximate square root instruction which is neat.
| hedgehog wrote:
| Open source FPGA tooling (F4PGA previously called SymbiFlow):
| https://f4pga.readthedocs.io/en/latest/
| 0xf00ff00f wrote:
| Wow, how crazy is this? This guy:
|
| * Designed a 32-bit ISA with vector instructions [0]
|
| * Implemented it on an FPGA
|
| * Wrote a gcc backend for his ISA [1]
|
| * Ported Quake, and it seems to run pretty well (Quake required a
| high-end Pentium back in the day)
|
| Now this is a full-stack developer.
|
| [0] https://www.bitsnbites.eu/the-mrisc32-a-vector-first-cpu-
| des...
|
| [1] https://gitlab.com/mrisc32/mrisc32-gnu-toolchain
| mbitsnbites wrote:
| The things you do in order to play Quake ;-)
|
| (BTW, recently started eyeing Quake 2 - but will have to work
| more on the CPU performance first)
| dosshell wrote:
| Talking about fullstack.
|
| How far away is network support?
|
| Like hosting bitsnbites.eu on it?
| mbitsnbites wrote:
| Haha! Infinitely far away (not on my horizon). Thought has
| crossed my mind, but there are so many other things I want
| to do first (e.g. audio, superscalar CPU, ...).
| rustybolt wrote:
| That looks surprisingly smooth for something not running on a
| GPU. What clock speed is it running on?
|
| Also, what resources can you recommend for writing your own
| GCC backend?
| dosshell wrote:
| If I don't mistaken he is also the original author of GLFW.
| tulio_ribeiro wrote:
| That's seriously impressive! The level of expertise and
| dedication involved in such a project is truly a remarkable and
| inspiring feat of engineering.
| varispeed wrote:
| So impressive!
|
| Btw. I remember preferring low resolution games and now when I
| think about it, I think my brain was "upscaling" them filling in
| the missing details in sort of subconscious and pleasant way.
| Once games around that era no longer supported low resolution in
| wake of early GPUs I kind of lost interest. The games looked
| sterile and boring.
| kolinko wrote:
| There is another thing - low res games were played on a CRT
| monitor that had a natural smoothing of pixels. If you launch
| any old game on any modern monitor it will look way worse than
| it used to be.
| sigmonsays wrote:
| is there a way to disable the sign into google popup?
___________________________________________________________________
(page generated 2024-01-17 23:00 UTC)