The TMS9918 library is designed for Arduino Nano and Uno, wired to the VDP as shown in the the schematic. For different wiring or other platforms, adjust the Core IO functions in the tms9918.cpp source file accordingly.
Copy all to the library folder of your Arduino IDE to install the library. Check out the examples.