Live data from Hacker News

Video Chess disassembled and commented

nanochess.org

11–20 of 72 posts

Re: Video Chess disassembled and commented

#13
post #4

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

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

#14

I 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!

[dead]

Re: Video Chess disassembled and commented

#15

Earlier 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…

I could listen to stories like this all day long.

Re: Video Chess disassembled and commented

#16

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

Enjoy: https://blog.jgc.org/2013/05/from-ground-up.html

Re: Video Chess disassembled and commented

#17

The 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

I highly recommend this podcast if you have any interest in our computing history

Re: Video Chess disassembled and commented

#18
post #4

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

> But holy how, that chess game really pushed the limits!

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

#19
Well, there's also this https://en.wikipedia.org/wiki/1K_ZX_Chess

1K 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

#20

I 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!

99% of people "writing software" could not write anything worth calling a chess engine by themselves.
Post reply on HN