Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ include mk/external.mk

# Non-trivial demonstration programs
ifeq ("$(ENABLE_SDL)", "1")
demo: $(BIN) $(DOOM_DATA)
doom: $(BIN) $(DOOM_DATA)
(cd $(OUT); ../$(BIN) doom.elf)
ifeq ("$(ENABLE_RV32F)", "1")
quake: $(BIN) $(QUAKE_DATA)
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,17 @@ make check

Run [Doom](https://en.wikipedia.org/wiki/Doom_(1993_video_game)), the classical video game, via `rv32emu`:
```shell
make demo
make doom
```

The build script will then download data file for Doom automatically. SDL2 based window
should appear when Doom is loaded and executed.
The build script will then download data file for Doom automatically. SDL2 based window should appear when Doom is loaded and executed.

If RV32F support is enabled (turned on by default), [Quake](https://en.wikipedia.org/wiki/Quake_(series)) demo program can be launched via:
```shell
make quake
```

The usage and limitations of Doom and Quake demo are listed in [docs/demo.md](docs/demo.md).

## riscv-arch-test

Expand Down
Binary file modified build/quake.elf
100644 → 100755
Binary file not shown.
48 changes: 48 additions & 0 deletions docs/demo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Demos

## Doom
**source**: [doom_riscv](https://github.com/smunaut/doom_riscv)

**commmad**: `make doom`

[Doom](https://en.wikipedia.org/wiki/Doom_(franchise)), a pioneering first-person shooter game developed by [id Software](https://en.wikipedia.org/wiki/Id_Software) in 1993, is known for its open-source code and vibrant community, it debuted innovations like genuine 3D graphics, networked multiplayer gameplay and the ability for players to create custom expansions.

![Doom Gameplay](https://imgur.com/bLc5LG8.gif)

### Limitations
* The input system is not supported yet

## Quake
**source**: [quake-embedded](https://github.com/sysprog21/quake-embedded/)

**command**: `make quake`

[Quake](https://en.wikipedia.org/wiki/Quake_(series)) was created in 1996 as a successor of the highly succcessful first-person shooter game Doom, it is based on Doom's game engine and 3D graphics compability, and it enhanced the fast-paced gameplay and online multiplayer over the Internet.

[quake-embedded](https://github.com/sysprog21/quake-embedded/) is an embedded RISC-V port of Quake based on [QuakEMBD](https://github.com/FantomJAC/quakembd).

Build Instruction:
```shell
git clone https://github.com/sysprog21/quake-embedded.git && cd quake-embedded
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../port/boards/rv32emu/toolchain.cmake \
-DCMAKE_BUILD_TYPE=RELEASE -DBOARD_NAME=rv32emu ..
make
```

![Quake Gameplay](https://imgur.com/gXKb7D0.gif)

### Default Key Bindings
* Move Forward/Backward: Up Arrow Key/Down Arrow Key
* Move Left/Right: Comma(,) Key/Period(.) Key
* Turn Left/Right: Left Arrow Key/Right Arrow Key
* Swim Up/Down: D Key/C Key
* Shoot: Left Mouse Button or CTRL Key
* Switch Weapon: Slash(/) Key
* Sprint: Shift Key

You may use the mouse to adjust the pitch and yaw angle

### Limitations
* Mouse wheel input is not supported
* All sound functions are not implemented