zbyti Posted September 12, 2021 Share Posted September 12, 2021 @devwebcl never seen this one, not confirm. Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted September 12, 2021 Share Posted September 12, 2021 6 hours ago, zbyti said: Colossus Chess 4.1 is only hack. is patch not hack 1 minute ago, devwebcl said: http://www.atarimania.com/game-atari-400-800-xl-xe-colossus-chess-40_6701.html 2 minutes ago, devwebcl said: rave.N - 06/12/2015 Colossus v4.0 has a catastrophic bug, in which it can lock up endlessly (most likely while the computer AI is thinking to move), v4.1 fixes this by changing just 2 bytes, the only instance of $D0 $FE changed into $EA $EA to make v4.1 which was patched, not recompiled. And, the text for "4.0" changed into "4.1", text is only seen by pressing the Spacebar (plus, seen on a loading screen for this cassette version). +1 Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 12, 2021 Share Posted September 12, 2021 (edited) 2 minutes ago, _The Doctor__ said: is patch not hack +1 Funny... I played many times tournament games, CC4 never hangs on atari800 emulator, maybe it is real machine issue? I don't need this patch. Edited September 12, 2021 by zbyti Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 12, 2021 Share Posted September 12, 2021 (edited) This test was interesting Stockfish Vs CC4 Showed white time is irrelevant. Stockfish_vs_CC4_2R-for.mp4 Edited September 12, 2021 by zbyti Quote Link to comment Share on other sites More sharing options...
devwebcl Posted September 12, 2021 Author Share Posted September 12, 2021 (edited) http://manillismo.blogspot.com/2017/08/campeonato-c64-de-ajedrez.html?m=0 http://manillismo.blogspot.com/2019/09/entrevista-martin-bryant.html Martin's interview. Edited September 12, 2021 by devwebcl Quote Link to comment Share on other sites More sharing options...
drac030 Posted September 12, 2021 Share Posted September 12, 2021 (edited) 6 hours ago, devwebcl said: Colossus v4.0 has a catastrophic bug, in which it can lock up endlessly (most likely while the computer AI is thinking to move), v4.1 fixes this by changing just 2 bytes, the only instance of $D0 $FE changed into $EA $EA to make v4.1 which was patched, not recompiled. That instruction ($d0 $fe) is "BNE *" which, indeed, is an infinite loop and causes the program to hang whenever it enters it with the condition not met (Z=0). I would however refrain from calling this a "catastrophic bug". I would also refrain from applying that patch relying on the current information. First of all, it is not a bug, it looks intended. Before trying out that branch instruction the program calculates a checksum (out of its own memory), and then, if this checksum's value is anything but the expected value, it enters that loop and indeed hangs. So it is rather some sort of protection against unauthorized modifications and such, and should not influence the program if it is not internally modified. Second, that code cannot influence the program's execution, because it is executed only shortly after program's start, and when the chessboard gets drawn, that area of memory is zeroed out. So any possible hangs during the match cannot be directly related to that loop. I would rather suspect that whoever experiences them, has a hardware problem with his Atari (failing RAM, most probably). In any case, the patch does really nothing, it just cancels that integrity check (or its first stage). I guess that if I am correct that comment on Atarimania should get deleted, because it is misleading (and even blames the author of major failure in programming). @www.atarimania.com Edited September 12, 2021 by drac030 4 Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 12, 2021 Share Posted September 12, 2021 (edited) @drac030 CC4 its one of the best chess on A8 but CC4 is only one strong engine not working correctly with Rapidus and more MHz. Can you possibly patch this in any future? On Rapidus CC4 starts making illegal moves, spotted on Alitrra 3.90. Edited September 12, 2021 by zbyti Quote Link to comment Share on other sites More sharing options...
drac030 Posted September 12, 2021 Share Posted September 12, 2021 Altirra's Rapidus emulation (System->Configure System->Peripherals->Devices->Add->Internal Devices->Rapidus Accelerator) is not very compatible, e.g. SysInfo did not work on it last time I checked, but in this case I do not think it is a real problem. Even with the generic turbo mode Altirra offers (System->Configure System->CPU->65816), Colossus Chess 4.0 indeed tends to do illegal moves or plainly hang. The problems seems to occur even at 10 MHz or 7 MHz. So I guess that the program has a race condition, that by accident does not occur at 1.77 MHz. I guess that would not be very easy to fix. 1 Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted September 12, 2021 Share Posted September 12, 2021 Having delved into the code in trying to port this CC4 to the 5200 I would say a Rapidus patch would probably be tricky due to the code using some very odd use of indexing into the zeropage by exploiting wraparounds. 1 Quote Link to comment Share on other sites More sharing options...
drac030 Posted September 12, 2021 Share Posted September 12, 2021 (edited) 17 minutes ago, Wrathchild said: Having delved into the code in trying to port this CC4 to the 5200 I would say a Rapidus patch would probably be tricky due to the code using some very odd use of indexing into the zeropage by exploiting wraparounds. Ah, so. Having just casually looking into the code I did not see that, but that is possible. In that case, however, the real Rapidus Accelerator has some provision to fix that: you can enable mirroring of the zero-page at $010000-$0100FF. And indeed, with this enabled, the situation seems to be improved even at 40 MHz. So my guess about the race condition seems to be wrong. Edited September 12, 2021 by drac030 3 Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 13, 2021 Share Posted September 13, 2021 (edited) 9 hours ago, drac030 said: And indeed, with this enabled, the situation seems to be improved even at 40 MHz. In old times programmers thinks that each doubling of the clock speed adds 50 ELO If CC4 have ~1650 ELO points on stock A8 then on your machine will be quite strong for amateur :] Edited September 13, 2021 by zbyti Quote Link to comment Share on other sites More sharing options...
drac030 Posted September 13, 2021 Share Posted September 13, 2021 16 hours ago, Wrathchild said: the code using some very odd use of indexing into the zeropage by exploiting wraparounds Could you post an example? I seem to not be able to spot any, but perhaps I am looking at the wrong place. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted September 13, 2021 Share Posted September 13, 2021 858E B9 F5 FF LDA unk_0_FFF5,Y 903A B9 F5 FF LDA unk_0_FFF5,Y 7E28 99 F6 FF STA unk_0_FFF6,Y 8543 B9 F6 FF LDA unk_0_FFF6,Y 8FC7 B9 F6 FF LDA unk_0_FFF6,Y 85B0 B9 F7 FF LDA unk_0_FFF7,Y 905E B9 F7 FF LDA unk_0_FFF7,Y 6EF8 BD FC FF LDA unk_0_FFFC,X 6F00 9D FC FF STA unk_0_FFFC,X 6F30 9D FC FF STA unk_0_FFFC,X 6EF5 9D FE FF STA unk_0_FFFE,X 6F28 BD FE FF LDA unk_0_FFFE,X 6F38 9D FE FF STA unk_0_FFFE,X 6EFB 9D FF FF STA unk_0_FFFF,X 6F2D BD FF FF LDA unk_0_FFFF,X 6F35 9D FF FF STA unk_0_FFFF,X 84FF B9 FF FF LDA unk_0_FFFF,Y 8F79 B9 FF FF LDA unk_0_FFFF,Y Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 13, 2021 Share Posted September 13, 2021 (edited) 38 minutes ago, Wrathchild said: 858E B9 F5 FF LDA unk_0_FFF5,Y 903A B9 F5 FF LDA unk_0_FFF5,Y 7E28 99 F6 FF STA unk_0_FFF6,Y 8543 B9 F6 FF LDA unk_0_FFF6,Y 8FC7 B9 F6 FF LDA unk_0_FFF6,Y 85B0 B9 F7 FF LDA unk_0_FFF7,Y 905E B9 F7 FF LDA unk_0_FFF7,Y 6EF8 BD FC FF LDA unk_0_FFFC,X 6F00 9D FC FF STA unk_0_FFFC,X 6F30 9D FC FF STA unk_0_FFFC,X 6EF5 9D FE FF STA unk_0_FFFE,X 6F28 BD FE FF LDA unk_0_FFFE,X 6F38 9D FE FF STA unk_0_FFFE,X 6EFB 9D FF FF STA unk_0_FFFF,X 6F2D BD FF FF LDA unk_0_FFFF,X 6F35 9D FF FF STA unk_0_FFFF,X 84FF B9 FF FF LDA unk_0_FFFF,Y 8F79 B9 FF FF LDA unk_0_FFFF,Y Looks more like internal board representation or something :] I bet above is rather data then code. Edited September 13, 2021 by zbyti Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted September 13, 2021 Share Posted September 13, 2021 could be both Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted September 13, 2021 Share Posted September 13, 2021 (edited) 1 hour ago, zbyti said: I bet above is rather data then code. "858E B9 F5 FF LDA unk_0_FFF5,Y" = "<Address> <Bytes at that address> <Equivalent instruction>" so that's code, but I suspect you're referring to the data stored in the zero-page that this accesses? @drac030 will know what he's looking at Edited September 13, 2021 by Wrathchild 1 Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 13, 2021 Share Posted September 13, 2021 (edited) 23 minutes ago, Wrathchild said: "858E B9 F5 FF LDA unk_0_FFF5,Y" = "<Address> <Bytes at that address> <Equivalent instruction>" so that's code, but I suspect you're referring to the data stored in the zero-page that this accesses? accidentally maybe this looks like a code or maybe some kind internal chess board representation in memory. https://www.chessprogramming.org/Board_Representation most popular at that time was: https://www.chessprogramming.org/10x12_Board Edited September 13, 2021 by zbyti Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 13, 2021 Share Posted September 13, 2021 (edited) @Wrathchild ah, right this is not contiguous block of code/memory you pasted. Edited September 13, 2021 by zbyti 1 Quote Link to comment Share on other sites More sharing options...
drac030 Posted September 13, 2021 Share Posted September 13, 2021 3 hours ago, Wrathchild said: 858E B9 F5 FF LDA unk_0_FFF5,Y 903A B9 F5 FF LDA unk_0_FFF5,Y ... This gave me right direction, thanks, there are indeed wrap-arounds at $6ec4-$6edc and $6ef9-$6f0e (both places being undoubtedly code). But, what is baffling me: my binary file generally does not match your list. I have loaded the program without execution, but e.g. code at $903A is SBC #$09 and not what you listed above. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted September 13, 2021 Share Posted September 13, 2021 Ah, my bad probably, that might be the listing file from the 5200 build ? Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted September 13, 2021 Share Posted September 13, 2021 Yep, I've got routines at $6EF3, $6F28 plus a number of individual references further on that index reference $FFFx addresses. loc_0_6EF3: ; CODE XREF: sub_0_6ED6+6�j LDA unk_0_0,X STA unk_0_FFFE,X LDA unk_0_FFFC,X STA unk_0_FFFF,X LDA #0 STA unk_0_FFFC,X STA unk_0_0,X STA byte_0_C0 STA byte_0_C1 LDA #4 RTS ; End of function sub_0_6ED6 loc_0_6F28: ; CODE XREF: sub_0_6F0C+9�j LDA unk_0_FFFE,X STA unk_0_0,X LDA unk_0_FFFF,X STA unk_0_FFFC,X LDA #0 STA unk_0_FFFF,X STA unk_0_FFFE,X LDA #1 RTS ; End of function sub_0_6F0C 1 Quote Link to comment Share on other sites More sharing options...
drac030 Posted September 13, 2021 Share Posted September 13, 2021 Replacing the absolute,X mode with zp,x (i.e. e.g. STA $FFFE,X with STA $FE,X) should fix the wrap-around problem. Or rather replace it with another wrap-around, but not so problematic this time. Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 13, 2021 Share Posted September 13, 2021 47 minutes ago, drac030 said: Replacing the absolute,X mode with zp,x (i.e. e.g. STA $FFFE,X with STA $FE,X) should fix the wrap-around problem. Or rather replace it with another wrap-around, but not so problematic this time. `STA $FFFE,X` why on Earth someone wants to lose cycle this way? Quote Link to comment Share on other sites More sharing options...
drac030 Posted September 13, 2021 Share Posted September 13, 2021 Noone. That is the decision of the assembler ($xx-constant, where constant>$xx) without the coder knowing. Sadly, same with STA $FFFE,Y which is much harder to avoid. 1 1 Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted September 13, 2021 Share Posted September 13, 2021 Also there are only LDX/STX zero-page indexed Y instructions and no LDA/STA zero-page indexed Y, only X. 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.