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

github.com/LinusCDE/chessmarkable @0.8.1-1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.8.1-1 ↗ · + Follow
223 symbols 432 edges 20 files 7 documented · 3%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

chessMarkable

rm1 rm2 opkg launchers Mentioned in Awesome reMarkable

A chess game for the reMarkable tablet writting using the pleco chess library which is a port of Stockfish.

  

Controlling

A chess piece can be moved in two ways:

  1. Clicking it once and clicking the spot it's supposed to
  2. Clicking it and moving the finger onto the square to move it there on release

The second method has the advantage that it doesn't highlight the chess piece or shows the possible moves.

FEN

When running the Game with the enviroment variable RUST_LOG set to debug, the FEN of a board will be output on each move. This is useful for debugging but also for manually saving a game state or resuming it elsewhere since this notation should be compatible with other chess programs/engines.

When starting a game, you'll need to specifiy a slot to play on. On quitting the game, the FEN will get saved to ~/.config/chessmarkable/savestates.yml which can be used to resume from.

(The -i option was removed in favor to add your own fen to the above file).

PGN Viewer

Chessmarkable also includes a PGN Player (huge thanks to @rmadhwal, for contributing this feature)!

You can put downloaded PGN Files into the directory ~/.config/chessmarkable/pgn on the device with software like scp, FileZilla or WinSCP. After this, you should be able to browse all the games from the menu point "PGN Viewer" and step through all the games.

Installation

Prebuilt binary/program

  • Go the the releases page
  • Get the newest released binary file (the one without any extension) and copy it onto your remarkable, using e.g. FileZilla, WinSCP or scp.
  • SSH into your remarkable and mark the file as executable with chmod +x chess
  • Stop xochitl (the interface) with systemctl stop xochitl
  • Start the game with ./chessmarkable (or whatever the binary is called now)
  • After you're done, restart xochitl with systemctl start xochitl

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).

Todo

  • Proper own icon(s)
  • Clean the code

reMarkable 2 support

This app cant actually drive the rM 2 framebuffer. It needs rm2fb for that.

If you execute chessmarkable from ssh, be sure to have followed rm2fb steps to enable the support. When installed running rm2fb-client ./chessmarkable should work as well. Launching through a launcher (from toltec) should just work.

Credit

  • The pleco library is used as the engine, checking valid moves and providing the bots
  • The chess pices are from pixabay here

Extension points exported contracts — how you extend this code

Scene (Interface)
(no doc) [5 implementers]
src/bin/chessmarkable/scene/mod.rs

Core symbols most depended-on inside this repo

draw_button
called by 25
src/bin/chessmarkable/canvas.rs
into
called by 20
src/square.rs
draw_text
called by 19
src/bin/chessmarkable/canvas.rs
clear
called by 13
src/bin/chessmarkable/canvas.rs
framebuffer_mut
called by 11
src/bin/chessmarkable/canvas.rs
show_bottom_game_info
called by 11
src/bin/chessmarkable/scene/game_scene.rs
draw_image
called by 10
src/bin/chessmarkable/canvas.rs
update_full
called by 9
src/bin/chessmarkable/canvas.rs

Shape

Method 112
Function 78
Class 19
Enum 13
Interface 1

Languages

Rust100%

Modules by API surface

chess_pgn_parser/src/model.rs48 symbols
chess_pgn_parser/src/lib.rs37 symbols
src/bin/chessmarkable/scene/game_scene.rs19 symbols
src/game.rs17 symbols
src/bin/chessmarkable/canvas.rs15 symbols
src/bin/chessmarkable/scene/replay_scene.rs14 symbols
src/replay.rs12 symbols
src/bin/chessmarkable/scene/pgn_select_scene.rs12 symbols
src/square.rs11 symbols
src/proto.rs7 symbols
src/player.rs6 symbols
src/bin/chessmarkable/scene/main_menu_scene.rs5 symbols

For agents

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

⬇ download graph artifact