I like trying out new programs on things I build and doing so on my VS Code db65xx debugging extension is no exception. I found a fun little chess program by Oscar Toledo that was easy to port to cc65 and needed only a few I/O modifications to get running on db65xx.
It doesn’t play a great game of chess but with the debugging support of db65xx it might be interesting to see if I can boost its playing strength.
Here are the moves for the game above (note moves are entered in long algebraic notation, for example, e2e4 for the first move):
1. e4 Nc6
2. Bc4 Nb4
3. Qh5 Nxc2+
4. Kd1 Nf6
Not a very great chess engine, but hey, the code and data fit in only 256 bytes (along with some zero-page usage).
Óscar Toledo, the program’s author gave me permission to post the ported version. You can find it in my db65xx example projects repository.