Skip to content

teeworlds 0.7 client in x86 64 assembly wot? nasm asm asmr!

Notifications You must be signed in to change notification settings

ChillerDragon/teeworlds-asmr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

teeworlds but its asmr

Basic light weight teeworlds 0.7 client written in pure assembly. Terminal only (no gui) and no external dependencies. Not even libc.

asmr janina

teeworlds asmr preview

deps

# debian / ubuntu
sudo apt install nasm make

It requires nasm 2.16 or newer.

build and connect to server

make
./teeworlds_asmr "connect 127.0.0.1:8303"

features

  • Can connect to teeworlds 0.7 and ddnet 0.7 servers.
  • Walk left and right with "a" and "d" keys
  • Get basic log output from broadcast/motd and chat

debug

To debug syscalls you can use strace to see args passed to kernel calls and also see the error message the linux kernel gives you back.

strace ./teeworlds_asmr

For full on assembly debugging. You can turn on symbols and step instruction by instruction.

make clean
make debug
gdb ./teeworlds_asmr
(gdb) layout asm
(gdb) set disassembly-flavor intel
(gdb) break _start
(gdb) stepi

After the last stepi just spam enter to "run" the program.

The gdb extension peda is quite helpful. It shows useful details while stepping.

project goal

Implement enough client side teeworlds 0.7 protocol to have a headless (without graphics) client that can connect to real teeworlds servers. Written in pure assembly without depending on any external library not even libc.

ressources

Thanks to these blog posts and documentations. They helped a lot.