Video Chess disassembled and commented
11–20 of 72 posts
Re: Video Chess disassembled and commented
#12Re: Video Chess disassembled and commented
#13Earlier quoted context omitted.
If you only had 4K of ROM and 128 bytes of RAM you’d find a way. That’s what we all did back then. This isn’t to diminish Atari’s achievement (this stuff was super hard and also super satisfying), it’s just to say that doing these kinds of tricks was what you did when you wanted to create something state of the art with few resources. Here’s a silly example: https://blog.jgc.org/2022/11/primality-testing-on-commodore…
That's perpetually true. "You're trying to do machine learning on a desktop PC?" "Hmmm, I wonder if we could use the GPU as a math engine?" But holy cow, that chess game really pushed the limits! (A side note I like to bring up occasionally: my first "computer" was "Atari BASIC" on my 2600. It had 63 bytes of RAM, I think. That didn't last long until my parents brought home a TS1000 with a luxurious 1KB of RAM.)
In 1985, me and another boy from school wrote a whole reliable network transport and stuffed it into unused memory on a Research Machines 480Z. We had 128 bytes for the receive buffer so in order to do anything we'd literally ship a packet across the network containing machine code and the stub code would CALL the receive buffer to perform tasks. Executable packets!
Re: Video Chess disassembled and commented
#14I think I’m pretty good at writing software, and then I see stuff like this, and the impostor syndrome kicks in hard. A fully working chess game in 4K of ROM, using each of the 128 bytes of RAM for several purposes? That’s some genius. Bravo to OP for the disassembly and explanation, too!
Re: Video Chess disassembled and commented
#15Earlier quoted context omitted.
That's perpetually true. "You're trying to do machine learning on a desktop PC?" "Hmmm, I wonder if we could use the GPU as a math engine?" But holy cow, that chess game really pushed the limits! (A side note I like to bring up occasionally: my first "computer" was "Atari BASIC" on my 2600. It had 63 bytes of RAM, I think. That didn't last long until my parents brought home a TS1000 with a luxurious 1KB of RAM.)
Yes. I was thinking about that after my comment. All the folks doing machine learning optimizations, weird stuff with AVX2, etc. are the same folks who would have been stuffing chess in 4K of ROM and 128 bytes of RAM. In 1985, me and another boy from school wrote a whole reliable network transport and stuffed it into unused memory on a Research Machines 480Z. We had 128 bytes for the receive buffer so in order to do…
Re: Video Chess disassembled and commented
#16Earlier quoted context omitted.
Yes. I was thinking about that after my comment. All the folks doing machine learning optimizations, weird stuff with AVX2, etc. are the same folks who would have been stuffing chess in 4K of ROM and 128 bytes of RAM. In 1985, me and another boy from school wrote a whole reliable network transport and stuffed it into unused memory on a Research Machines 480Z. We had 128 bytes for the receive buffer so in order to do…
I could listen to stories like this all day long.
Re: Video Chess disassembled and commented
#17The podcast advent of computing just had a deep dive into the intricacies and limitations of the Atari 2600. Having just listened to that episode, it makes this achievement even more impressive. https://overcast.fm/+Ri2NFzoG8
Re: Video Chess disassembled and commented
#18Earlier quoted context omitted.
If you only had 4K of ROM and 128 bytes of RAM you’d find a way. That’s what we all did back then. This isn’t to diminish Atari’s achievement (this stuff was super hard and also super satisfying), it’s just to say that doing these kinds of tricks was what you did when you wanted to create something state of the art with few resources. Here’s a silly example: https://blog.jgc.org/2022/11/primality-testing-on-commodore…
That's perpetually true. "You're trying to do machine learning on a desktop PC?" "Hmmm, I wonder if we could use the GPU as a math engine?" But holy cow, that chess game really pushed the limits! (A side note I like to bring up occasionally: my first "computer" was "Atari BASIC" on my 2600. It had 63 bytes of RAM, I think. That didn't last long until my parents brought home a TS1000 with a luxurious 1KB of RAM.)
Having 4 kilobytes of ROM made it relatively easy, I think. If one ignores draws by repeated positions (which I think all small chess programs do), board state can easily be stored in 67 bytes or so (64 for the board proper plus four bits for whether various castlings are allowed, plus a byte indicating the square for en passant opportunity, plus a byte for counting for the 50-move rule), leaving 61 for the search algorithm.
I think https://en.wikipedia.org/wiki/1K_ZX_Chess, with 672 bytes of code and therefore 352 bytes of RAM for storing game state _and_ screen data might be more impressive.
I would have to see at what level both programs play to be sure, though.
Re: Video Chess disassembled and commented
#191K ZX Chess's code takes up only 672 bytes in memory,[2] but implements chess rules except for castling, promotion, and en passant, including a computer opponent.[3] It was the smallest implementation of chess on any computer at the time.
672 bytes RAM, No ROM. No promotion is a killer though
Re: Video Chess disassembled and commented
#20I think I’m pretty good at writing software, and then I see stuff like this, and the impostor syndrome kicks in hard. A fully working chess game in 4K of ROM, using each of the 128 bytes of RAM for several purposes? That’s some genius. Bravo to OP for the disassembly and explanation, too!