MCPcopy Index your code
hub / github.com/LinusCDE/doomarkable

github.com/LinusCDE/doomarkable @0.4.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.4.2 ↗ · + Follow
49 symbols 86 edges 9 files 1 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DOOMarkable

rm1 rm2 opkg launchers

This is a doom port intended for the reMarkable 1.

 

Demo Video on rM 1 | Demo Video on rM 2 (not recommended)

What's mainly used and how it's done

It is composed out of a lot of different compontents:

  • doomgeneric-rs - Rust bindings for doomgeneric
  • doomgeneric - An awesome and easy to use doom port made by @ozkl
  • libremarkable - Drawing to the display and reading inputs
  • blue-noise - An amazing dithering algorithm to fake grayscale output

The meat of the work was to port doom to rust (doomgeneric-rs) and dithering the image and doing that as fast as possible! The dither speed was achived through forcing better optimizations and caching the code. The dithering is actually done at compile time for a 320x200 source image and the results (for upscaling 4x) are put into the generated binary itself. The binary then just needs to decompress this and look up the results for each pixel.

Current state

The game currently runs at about 11-14 FPS on the device. It's not using the low latency drawing even though it's pretty simple to use since the image has no gray shades. The reason is that using an A2-Like refresh has less artifacts and ghosting. I personally find this worth the extra latency when playing.

The game currently runs fine but there are still some things to do:

  • [ ] Making it easy to get the game resources (semi done)
  • [x] Properly exit the game without requiring killing the process
  • [x] Adjusting gamma to make dithered visuals clearer for certain rooms
  • [x] Add an battery indicator (this sucks a lot of juice ..ahem.. blood)
  • [x] Package it up for toltec and inclusion in launchers
  • [ ] Consider a smaller size for the rM 2, so the eink software driver doesn't die trying to update that many dots

How to run

  • Download the latest binary from the release page (the file without any extension)
  • Copy the file to e.g. /home/root on your reMarkable (e.g. using FileZilla or WinSCP)
  • Find an appropriate IWAD file (game resources) and put it in /home/root (more details)
  • Log into the device using ssh (e.g. with Putty) and go into your chosen directory
  • Make the binary executable by running chmod +x doomarkable
  • Ensure no other UI is running (e.g. stop the default UI with systemctl stop xochitl and start it later using start instead of stop)
  • Run the binary: ./doomarkable (on the rM 2, you'll need rm2fb and prefix that command with rm2fb-client)
  • DOOM should now run on your device. If the game doesn't come up, view the output for any errors or enable debugging by adding RUST_LOG=debug before the command

Compiling

In general building should work on most toolchains. You generally wanna target armv7-unknown-linux-gnueabihf for any remarkable. But as with all things in life, stuff never works great on every setup.

That's why I recommend to nowadays build with the rust image from toltec-dev/toolchain. It is the most modern and the closest to the actual reMarkable system as you're gonna get as of now.

To make it easier to use, I found that you can use the rust image (ghcr.io/toltec-dev/rust:v3.2, all versions). This is done using the Cross.toml file. So you should just need to run cross build --target=armv7-unknown-linux-gnueabihf --release and it will use the above image (or possibly newer if this readme gets out-of-date).

Core symbols most depended-on inside this repo

current_layout
called by 7
src/layout/mod.rs
rect
called by 7
src/layout/mod.rs
clear
called by 5
src/layout/mod.rs
create
called by 5
src/layout/keyboard.rs
init
called by 4
src/evdev_keyboard.rs
get_area
called by 4
src/layout/mod.rs
process_fingers
called by 4
src/layout/mod.rs
clear
called by 3
src/main.rs

Shape

Method 22
Function 18
Class 5
Enum 4

Languages

Rust100%

Modules by API surface

src/layout/mod.rs19 symbols
src/main.rs10 symbols
src/blue_noise_dither.rs7 symbols
src/evdev_keyboard.rs5 symbols
src/layout/keyboard.rs4 symbols
src/layout/settings.rs1 symbols
src/layout/controls.rs1 symbols
src/layout/confirmfullscreen.rs1 symbols
src/layout/confirmexit.rs1 symbols

For agents

$ claude mcp add doomarkable \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact