stabguy Posted June 5, 2016 Share Posted June 5, 2016 This is pretty cool. What is your chess playing background? Casual/amateur. I learned how to play at age 5 and soon could beat everyone in my family and school. It's one of my lifelong hobbies but I never joined a chess club or played in any tournaments. I'm a professional computer programmer. In fact, back in 1983 when I played this chess game I was also attending high school and writing video games in 6502 and 6809 assembly language as a freelance developer. It always amazed me that Atari could write a chess program with only 128 bytes of RAM. The gaming magazines at the time went on and on about the VCS limit of 3 (or 6) sprites per row and how this was overcome with the "venetian blind" trick. As if the hardest part of a chess program is the graphics. Recently I Googled the subject again and mostly found the same garbage about venetian blinds. One comment here on AtariAge had a good clue. Usually a chess program is recursive and stores a complete board at each node in the call tree. Instead, you could just have a global board in RAM (say 32 bytes, one for each piece) and remember "diffs" so you can undo a move after considering it. If a diff was 4 bytes, you could recurse 5 ply for 30 bytes including the return address on the stack. This design might also explain the multiple move bug at levels 6 and 7. Perhaps moves didn't always get properly undone at deeper plies. Oh wow, I forgot I'd even made this thread. I joined this site just to reply! The Google search above led me here and this thread was crying out for someone with Video Chess level 7 experience. 5 Quote Link to comment Share on other sites More sharing options...
+thegoldenband Posted June 5, 2016 Share Posted June 5, 2016 Hey, nice game! I beat the VCS on Level 7 too, albeit in emulation where I could crank up the speed -- but even then it took a long time, though the victory itself was relatively quick. I've previously posted the game here, but I'll add it here as well: [Date "2012.06.21"][White "Atari Video Chess, Level 7"][black "thegoldenband"][Result "0-1"]1. e4 d5 2. exd5 Nf6 3. c4 c6 4. dxc6 Nxc6 5. Nf3 e5 6. Nc3 e4 7. Ng5 Bf5 8. Be2 h6 9. Nh3 Bxh3 10. gxh3 Bc5 11. O-O Qe7 12. Re1 O-O-O 13. Bg4+ Kb8 14. Nb5 Ne5 15. Be2 a6 16. Nc3 Rhe8 17. Qc2 Qd7 18. Na4 Qxh3 19. Nxc5 Nf3+ 20. Bxf3 exf3 21. Nd7+ Nxd7 22. Rxe8 Qg2# 0-1thegoldenband vs atari chess lvl 7.gif 2 Quote Link to comment Share on other sites More sharing options...
Link6415 Posted August 19, 2016 Share Posted August 19, 2016 All very cool. Quote Link to comment Share on other sites More sharing options...
Tempest Posted August 19, 2016 Share Posted August 19, 2016 Someone needs to look at the code and figure out exactly what causes that bug. Quote Link to comment Share on other sites More sharing options...
Mr SQL Posted August 19, 2016 Share Posted August 19, 2016 Video Chess is one of my favorite 4K chess programs alongside the 1977 Fidelity Chess Challenger, I play level 6 frequently and have never encountered the double move bug or pieces moving arbitrarily. There is a timeout screensaver that is more likely to be seen at level 6 and 7 which can make pieces arbitrarily vanish for a duration, but they all reappear in their correct position as soon as you move the joystick. Some people may also forget where the pieces were between moves because you can't see the board while the computer is busy thinking in different colors 1 Quote Link to comment Share on other sites More sharing options...
Tempest Posted August 19, 2016 Share Posted August 19, 2016 Video Chess is one of my favorite 4K chess programs alongside the 1977 Fidelity Chess Challenger, I play level 6 frequently and have never encountered the double move bug or pieces moving arbitrarily. There is a timeout screensaver that is more likely to be seen at level 6 and 7 which can make pieces arbitrarily vanish for a duration, but they all reappear in their correct position as soon as you move the joystick. Some people may also forget where the pieces were between moves because you can't see the board while the computer is busy thinking in different colors So your theory is that the pieces aren't actually being moved, but rather that the screensaver makes them disappear briefly and people forgot where they used to be? That would be interesting if it's the case as this bug is somewhat legendary. Quote Link to comment Share on other sites More sharing options...
Mr SQL Posted August 19, 2016 Share Posted August 19, 2016 So your theory is that the pieces aren't actually being moved, but rather that the screensaver makes them disappear briefly and people forgot where they used to be? That would be interesting if it's the case as this bug is somewhat legendary. Yes, I've encountered this many times when I've come back to move and the screensaver has kicked in. Board always reverts to normal as soon as I move the stick and the normal Chess colors come back. If you don't end the screensaver it's easy to think the computer has been cheating and just turn the game off. The board vanishing between moves probably adds to the confusion. 1 Quote Link to comment Share on other sites More sharing options...
cryptoboy Posted January 2, 2017 Share Posted January 2, 2017 Has anyone ever made a commented disassembly of the 4K Video Chess rom? I'd love to see how the game AI was implemented. Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 5, 2017 Share Posted March 5, 2017 I don't think so. However, here is a hack you can run at a very high framerate to cut down on the waiting. The program will wait for a stick to center whenever moving the cursor, so you can run as fast as you want. I threw in an odd/even scanline adjustment to fill in the pieces when using phosphor mode (rock stable @262 per frame, all HMOVE instructions at cycle 0). Z26 is VERY quick when using -r99999! VideoChess(ForHighFramerate).bin 3 Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 18, 2017 Share Posted March 18, 2017 Hacking the "Computer Chess" version to do the same, I spotted a glitch that I'd never noticed before. Most of the time, the AI (playing white) will begin by moving it's kings pawn forward 2 spaces. Threaten this position by moving your queens pawn two. The AI will defend its pawn position by moving its queens knight. If you then move your kings bishop pawn to threaten the pawn from the opposite side, it responds by taking this one. The bug is that the victorious pawn becomes yours! C:E2-E4 P:D7-D5 C:B1-C3 P:F7-F5 C:E4-D5 +defect This glitch is not present in the commercial game. Still looking for proof of any glitch there. Quote Link to comment Share on other sites More sharing options...
Keatah Posted March 19, 2017 Share Posted March 19, 2017 Oh what a cool hack. Quote Link to comment Share on other sites More sharing options...
Tempest Posted March 19, 2017 Share Posted March 19, 2017 Neat! Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 20, 2017 Share Posted March 20, 2017 Computer Chess AI is kinda strange...it'll play until most of its high ranks are off the board, and then stop moving at all. No pawn promotions either. Quote Link to comment Share on other sites More sharing options...
Tempest Posted March 20, 2017 Share Posted March 20, 2017 Computer Chess AI is kinda strange...it'll play until most of its high ranks are off the board, and then stop moving at all. No pawn promotions either. So there are no pawn promotions in computer chess at all or the computer AI just doesn't go for them? Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 20, 2017 Share Posted March 20, 2017 None for both players. A pawn will just be stuck there upon reaching the other side. No setup mode either, so you can't even manually promote pawns. Quote Link to comment Share on other sites More sharing options...
Tempest Posted March 20, 2017 Share Posted March 20, 2017 None for both players. A pawn will just be stuck there upon reaching the other side. No setup mode either, so you can't even manually promote pawns. Good to know, I need to update my page then. Quote Link to comment Share on other sites More sharing options...
Tempest Posted March 20, 2017 Share Posted March 20, 2017 How much space is left over in each version of the program? I'm starting to wonder if they weren't forced to ditch the chess notation in the final version to make room for the pawn promotions, board setup, and bug fix, especially since they had to strip 2K out of it to get it down to 4K. Just a theory. Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 20, 2017 Share Posted March 20, 2017 That's hard to tell. In a near-completed stage like this, free space is gained through optimization - changing short JMP distances to relative branches, using subroutines for similar/duplicated code, rewriting sloppy routines, etc. There's nothing "unused" in that sense. I haven't looked at the earlier proto (I never bothered to play even this one much, and always assumed that the game worked correctly). Undoubtedly, the caption bitmaps were removed out of necessity to make space for the fixes. Might need some chess master's opinion about the higher gameplay levels - as far as I can tell, they don't affect the outcome much here. For checking that, here is the finished hack for running at an emulator's top speed (w/phosphor mesh to fill in pieces). It uses the left stick like the released game. Like the above, you need to center the stick after each square. ComputerChess(ForHighFramerate).bin Quote Link to comment Share on other sites More sharing options...
AtariDude Posted October 23, 2017 Share Posted October 23, 2017 Weird about the lack of pawn promotions at the higher level. I know that it does allow pawn promotion at the higher level where it automatically promotes to a queen. I don’t play at the higher levels since I get bored waiting for it to move. Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted October 24, 2017 Share Posted October 24, 2017 No...this is the "Computer Chess" version of Video Chess (i.e. with the onscreen matrix letters). Pawn promotions are not present on any level. Neither is the endgame when the program has worked out it's strategy (it'll just give up and no longer move anywhere). Quote Link to comment Share on other sites More sharing options...
Michael Malak Posted April 10, 2023 Share Posted April 10, 2023 On 1/2/2017 at 3:23 PM, cryptoboy said: Has anyone ever made a commented disassembly of the 4K Video Chess rom? I'd love to see how the game AI was implemented. +1 In the six years since the question above was asked, has anyone done a commented disassembly of Video Chess? Quote Link to comment Share on other sites More sharing options...
Tempest Posted April 10, 2023 Share Posted April 10, 2023 On 10/24/2017 at 10:08 AM, Nukey Shay said: Neither is the endgame when the program has worked out it's strategy (it'll just give up and no longer move anywhere). I must have missed this part back when it was posted. Can someone elaborate on this? Quote Link to comment Share on other sites More sharing options...
SoundGammon Posted June 11, 2023 Share Posted June 11, 2023 (edited) Here's a illegal move in KnightMate Chess: Notice where the "X" is where the computer moved his Knight from. This was on Stella and I want to see if real hardware does it! Edited June 11, 2023 by SoundGammon Quote Link to comment Share on other sites More sharing options...
+thegoldenband Posted June 11, 2023 Share Posted June 11, 2023 11 hours ago, SoundGammon said: Here's a illegal move in KnightMate Chess: Notice where the "X" is where the computer moved his Knight from. This was on Stella and I want to see if real hardware does it! KnightMate is a hack of Video Chess, right? It'd be interesting to put the same sequence of moves into Video Chess and see if the same thing happens. I don't remember how deterministic its algorithm is... Quote Link to comment Share on other sites More sharing options...
+nanochess Posted June 11, 2023 Share Posted June 11, 2023 I'm curious enough so I've started disassembling and analyzing the code of Video Chess. Edit: So far I found the Reset/Select buttons code operation and how the chessboard is setup so now I know how the pieces are represented and the board addresses. Edit 2: Now I know where it handles the joystick movement and button, along with the chessboard editing feature. I found the movement generator, the code to restore the board after a movement, and the code to change the background color as the Atari "thinks". Now I need to find the code that saves the board state before a movement. 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.