mirror of
https://github.com/jndean/IPUDOOM.git
synced 2026-03-21 15:09:45 +00:00
Adjust memory config to fit E1M2. Spruce up README.
This commit is contained in:
22
README.md
22
README.md
@@ -1,30 +1,36 @@
|
||||
|
||||

|
||||
|
||||
A WIP to fit Doom 1993 into the SRAM (~L1 cache) of the Graphcore MkII IPU (an AI accelerator chip which was definitely not designed to play video games). This is a hobby project, not a Graphcore product.
|
||||
A WIP to run Doom 1993 into the SRAM (~L1 cache) of the Graphcore MkII IPU (an AI accelerator chip which was definitely not designed to play video games). This is a hobby project, not a Graphcore product.
|
||||
|
||||
### Build and Run
|
||||
## Build and Run
|
||||
I use Ubuntu20 and Poplar SDK 3.3, but recent versions of either should be fine.
|
||||
Due to the use of mutable global state and a custom exchange compiler, IPUDOOM requires a real IPU and will not run on the IPUModel (CPU simulating an IPU).
|
||||
Make sure you have X11 fowarding over SSH working (use `ssh -X <address>` and have a local X server, e.g. Quartz on Mac, Xming on Windows). If your connection is fast enough, you should be able to get > 30 fps.
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
sudo apt update
|
||||
sudo apt-get install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libpng-dev g++-7
|
||||
|
||||
# Activate your poplar SDK
|
||||
source ~/path/to/poplar/build_release/activate.sh
|
||||
|
||||
# Clone and build
|
||||
git clone git@github.com:jndean/IPUDOOM.git
|
||||
cd IPUDOOM
|
||||
make
|
||||
# Download shareware resource pack
|
||||
make -j4
|
||||
|
||||
# Download the doom shareware resource pack (contains the free levels)
|
||||
wget https://distro.ibiblio.org/slitaz/sources/packages/d/doom1.wad
|
||||
# Run
|
||||
|
||||
# To play the game, run. Press any key to bring up the menu.
|
||||
./build/doom -iwad doom1.wad -width 320 -nosound -nomouse
|
||||
```
|
||||
|
||||
|
||||
### Progress Log:
|
||||
Started with vanilla Doom running on the CPU, began offloading subsystems to the IPU (just Tile 0 at first):
|
||||
## Progress Log:
|
||||
Started with Chocolate Doom running on the CPU, began offloading subsystems to the IPU (just Tile 0 at first):
|
||||
|
||||
- [x] Create IPU hooks for key methods like G_Ticker and G_Responder so IPU can step game time and respond to keypresses in real time. IPU uses callbacks on the host to load and unpack all level geometry from disk whenever the player starts a new level.
|
||||
|
||||
@@ -50,7 +56,7 @@ Started with vanilla Doom running on the CPU, began offloading subsystems to the
|
||||
|
||||

|
||||
|
||||
- [x] Extend the JIT-patching texture exchange to support span textures and zlighting, so IPU can texture and shade floors + ceilings.
|
||||
- [x] Extend the JIT-patching texture exchange to support span textures and zlighting, so IPU can texture and shade floors + ceilings. (The flashing in the gif below comes from gunfire, though enemies and weapons are not yet rendered).
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -208,14 +208,15 @@ void D_Display(void) {
|
||||
|
||||
if (automapactive)
|
||||
AM_Drawer();
|
||||
// IPU_AM_Drawer(); // JOSEF. Disabled while I split render tiles
|
||||
// IPU_AM_Drawer(); // JOSEF. TMP Disabled while I split render tiles
|
||||
|
||||
|
||||
if (wipe || (viewheight != SCREENHEIGHT && fullscreen))
|
||||
redrawsbar = true;
|
||||
if (inhelpscreensstate && !inhelpscreens)
|
||||
redrawsbar = true; // just put away the help screen
|
||||
ST_Drawer(viewheight == SCREENHEIGHT, redrawsbar);
|
||||
ST_Drawer(viewheight == SCREENHEIGHT, redrawsbar);
|
||||
// (void) redrawsbar; // JOSEF: for disabling ST_Drawer
|
||||
fullscreen = viewheight == SCREENHEIGHT;
|
||||
break;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ extern "C" {
|
||||
#include "tables.h"
|
||||
|
||||
|
||||
#define IPUMAXLUMPBYTES (32000)
|
||||
#define IPUMAXLUMPBYTES (40000)
|
||||
#define IPUMISCVALUESSIZE (116)
|
||||
#define IPUMAXEVENTSPERTIC (5)
|
||||
#define IPUAMMARKBUFSIZE (544)
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
// #define IPUMALLOC_DEBUGPRINT 0
|
||||
|
||||
__attribute__ ((aligned (4)))
|
||||
static unsigned char IPUMALLOC_STATIC_pool[10000];
|
||||
static unsigned char IPUMALLOC_STATIC_pool[8000];
|
||||
__attribute__ ((aligned (4)))
|
||||
static unsigned char IPUMALLOC_LEVEL_pool[200000];
|
||||
static unsigned char IPUMALLOC_LEVEL_pool[250000];
|
||||
__attribute__ ((aligned (4)))
|
||||
static unsigned char IPUMALLOC_TMP_pool[512]; // This is a category I made up, for fleeting allocations
|
||||
|
||||
|
||||
@@ -417,6 +417,8 @@ void P_LoadLineDefs(const unsigned char *buf) {
|
||||
else
|
||||
ld->backsector = 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
12
src/m_menu.c
12
src/m_menu.c
@@ -1243,19 +1243,19 @@ boolean M_Responder(event_t *ev) {
|
||||
if (key == key_menu_decscreen) // Screen size down
|
||||
{
|
||||
// JOSEF: Unsupported on IPU
|
||||
// if (automapactive || chat_on)
|
||||
// return false;
|
||||
if (automapactive || chat_on)
|
||||
return false;
|
||||
// M_SizeDisplay(0);
|
||||
// S_StartSound(NULL, sfx_stnmov);
|
||||
return true;
|
||||
// return true;
|
||||
} else if (key == key_menu_incscreen) // Screen size up
|
||||
{
|
||||
// JOSEF: Unsupported on IPU
|
||||
// if (automapactive || chat_on)
|
||||
// return false;
|
||||
if (automapactive || chat_on)
|
||||
return false;
|
||||
// M_SizeDisplay(1);
|
||||
// S_StartSound(NULL, sfx_stnmov);
|
||||
return true;
|
||||
// return true;
|
||||
} else if (key == key_menu_help) // Help key
|
||||
{
|
||||
M_StartControlPanel();
|
||||
|
||||
Reference in New Issue
Block a user