xcore.ai - Can it run Doom?

XCore Project reviews, ideas, videos and proposals.
User avatar
infiniteimprobability
Verified
XCore Legend
Posts: 1167
Joined: Thu May 27, 2010 10:08 am

xcore.ai - Can it run Doom?

Post by infiniteimprobability »

This is an old project (started by a former compiler engineer in XMOS who did most of the original porting work 11 years ago) has finally come to fruition.. Thanks to xcore.ai and it's ability to directly address external LPDDR we can now target the chip and run an old favourite in real time.

Here's the video https://www.youtube.com/watch?v=YO4567j831c.

Some details:

  • Runs on the XCORE-AI-EXPLORER board with xcore.ai chip.
  • Uses USB video class as the screen (the frame buffer is sent to the host). Needed to do colour space conversion from 16b RGB to YUV2 as webcams use that format
  • Uses ~2MB of LPDDR for heap, all other code and data in on-chip RAM
  • Manages about 30 FPS peak, 25 average when not loading WADs
  • Loads WAD files over fileio from host (this is the cause of the stutters)
It works though and definitely recognisable!

So yes, it can run Doom.

Screenshot from 2025-07-11 10-05-40.png
This is a home project so going slowly but I would love to get audio working and perhaps look at adding a MIDI synth as the background music is a big part of this game. Controls would be nice too to make it human playable and I have a PS/2 keyboard on its way which should be fairly easy to hook up.

If anyone fancies collaboarting, let me know. Code is a bit of a mess at the moment as I wanted to get to this stage and may have taken a few short cuts! I'd like to tidy that in time. Current TODO list:
  • Store the WAD files in flash (I'm working on this already). Warning - smallest WAD is 4.2MB and flash is default 4MB so I have put a bigger FLASH on my board
  • Replace USB video class with 320x240 colour LCD. I have ordered a cheap SPI one from ali-express which I'll try out!
  • Get PCM samples playing - orginal samples are 11kHz/8b so need SRC to 48kHz and pushed to the DAC
  • Find and port a MIDI synth which can play the MIDI/MUS files and mix into the DAC output
  • General tidy
You do not have the required permissions to view the files attached to this post.
Engineer at XMOS
CiaranW
Verified
Member
Posts: 13
Joined: Tue Jun 28, 2022 10:58 am

Post by CiaranW »

Wow, that's very cool!