[HN Gopher] RP2040 Doom ___________________________________________________________________ RP2040 Doom Author : xkriva11 Score : 174 points Date : 2022-03-14 13:59 UTC (9 hours ago) (HTM) web link (kilograham.github.io) (TXT) w3m dump (kilograham.github.io) | ChuckMcM wrote: | Fun stuff, it always amazes me that people are surprised. Not | having lived through it is a part of that I'm sure. | | The RP2040 is more powerful than an 80286. The PC/AT which was | hugely more powerful than the original IBM PC (on which DOOM also | ran). Put a keyboard, mouse, and an frame buffer on an STM32F4 or | F7 and you've got the computational and capability equivalent of | the PC's that powered the world in 1985. People did accounting, | CAD, spreadsheets, email, all sorts of things on them. Amazing I | know, but here we are. | _joel wrote: | Sure, but it's not about the speed of the hardware but what was | done to port it to the hardware. RAM and ROM would be larger | then. It has 256KB, I remember 286's having well over 1MB, | 386's even more! | | I don't think PC/AT was sub $1 either :) | vbezhenar wrote: | I thought about building toy pc with rp2040 but I wasn't able | to solve gpu problem. Driving display seems very hard task | without some dedicated hardware. And using serial output is not | fun. | II2II wrote: | There are a lot of options on this front. As far as I can | tell, most displays for embedded platforms are sold as | modules that you interface with via a serial or parallel bus. | There are libraries out there to handle the grunt work, if | you don't want to dig through data sheets yourself. | | If you want something that doesn't use any dedicated | hardware, interfacing with analog displays (e.g. | NTSC/PAL/VGA) can be done with a handful of resistors on GPIO | pins. Conceptually, it is easier but actually dealing with | timing is a pain. Again, libraries that deal with the grunt | work are available. | bombcar wrote: | Doom required a 386 (and really wanted a 486) iirc. | | Wolfenstein worked on 286. | klelatti wrote: | Isn't it a __lot__ more powerful than a 286? 32 bit dual core | at 133 MHz - roughly a Pentium say? | | Plus some of the early 8 bit machines drove a display with | minimal extra hardware - eg the ZX80 / ZX81 although it was | very very slow as a result! | ChuckMcM wrote: | In terms of instructions per clock and I/O bandwidth it | compares more favorably to 16 bit architectures than 32 bit | ones even though the Cortex-M family is nominally 32 bits. | klelatti wrote: | I think memory bandwidth is key and I don't know how the | RP2040 stacks up but even 486 wasn't superscalar and maxed | out at 66MHz by comparison. | IMSAI8080 wrote: | Wow. That's just amazing work. | RF_Savage wrote: | Oh boy, that is really impressive. | gchadwick wrote: | Awesome! A huge amount of work must have gone into this. | | I did some playing around with VGA graphics from the Pico when it | first came out (wrote a simple library to produce SNES like | graphics, wrote it all up on my blog | https://gregchadwick.co.uk/blog/playing-with-the-pico-pt6/). It | felt like Doom should be doable but I figured you'd need an off | chip RAM expansion interfaced via the PIO. Clearly not. | | The Pico really is a very fun board to play around with. Could be | a great target for a retro style mini console thing. | jrockway wrote: | > Could be a great target for a retro style mini console thing. | | I've been playing with this thing. It's quite neat: | https://shop.pimoroni.com/products/picosystem?variant=323695... | | (Note that it's a dev board; if you just want to play AAA | games, not the thing to buy. If you want to program a game and | show it off, it's what you want.) | klelatti wrote: | Thanks for highlighting this - looks awesome. | kefabean wrote: | These are truly fab little devices - i bought a couple for | my kids to play simple (not too addictive) games and | hopefully get them in to programming. | | question is, how would one go about compiling Doom for the | Picosystem? that would be so cool... | 0des wrote: | Music and sound too??? | | ...what am I doing with my life | WithinReason wrote: | This thing even has networked multiplayer! In about 256K of RAM | and 2MB flash! (It's the Raspberry Pi Pico board) | | Carmack would be proud! | tenebrisalietum wrote: | In contrast with these limited platforms: | | SNES Doom - 128KB RAM, I think a 2MByte ROM, CPU is 65816 at | 3Mhz + SuperFX RISC CPU at 21Mhz, which also had its own 64KB | of RAM. | | PSX Doom - 2MB RAM + 1KB fast scratchpad, able to load from a | standard 650MB CD, CPU is a MIPS R3051 at 33Mhz + the PSX | accelerated graphics, not used except to draw strips | | So doing this in a device that has not too much more RAM than | the SNES and also has to livestream the VGA signal Atari 2600 | style is exceedingly impressive. It's a dual CPU unit but | basically having to spend a core manually bit banging the VGA | signal like that is what fascinated me the most. | _Microft wrote: | I haven't checked but don't think that the second core was | bitbanging the VGA signal. The RP2040 has PIO (programmable | I/O) mini cores that can read directly from RAM (DMA) and | address the GPIO pins directly. They most likely used that to | their advantage. | | Edit: yes, see | https://kilograham.github.io/rp2040-doom/rendering.html | TillE wrote: | Those are important limitations, but there's a lot of room for | solutions when you have a dual core CPU which is many times | faster than a 486. | WithinReason wrote: | Doom 1 itself has 4MB of RAM as a minimum requirement: | | https://www.computerhope.com/games/games/doomx.htm#doom | anthk wrote: | I would love nethack/slashem on this, but I think NH 3.4.3 needs | 2MB of RAM at least. | AlotOfReading wrote: | What a coincidence, I was working on porting doom to the e-ink | badger2040 last week. Getting doom to fit into memory was fairly | straightforward, but they did a better job than me. I'm very | impressed they got the original WADs and networking going as | well. Great work! | whiskers wrote: | Hah! I never imagined DOOM as a use case when I was designing | the Badger 2040 - how foolish of me, in hindsight it's obvious! | | How far did you get with it? Any video of the end result? | AlotOfReading wrote: | I got things drawing with low-complexity WADs, but had | issues/graphical snow after a few seconds in and needed more | polish to fit the original WAD in memory. I figured the video | would be best if it opened with the hangar level, so I | haven't made a one yet. Might be worth rebasing off this | effort instead. | vardump wrote: | I'm speechless. That was... an impressive effort. | qwertox wrote: | > I2C networking for up to 4 players | | How does one even get these ideas? | sitzkrieg wrote: | two free gpios left, clearly | anthk wrote: | Also, check fastdoom: | | https://www.youtube.com/watch?v=EZvI8wCVOPU | | https://www.youtube.com/watch?v=Eh31az9epAo | _joel wrote: | This is a work of art, I've learnt a lot reading this, thank you. ___________________________________________________________________ (page generated 2022-03-14 23:00 UTC)