|
|
||||||||||||
THE PATCH FOR ALL CHESS COMPUTERS WITH H8 BUG
Hi,
The H8 bug is present in many chess computers from Saitek (since 1997, 28 years!): Saitek Talking Chess Academy Saitek Cosmos Saitek Centurion Saitek Cougar Saitek Challenger Saitek Expert Travel Saitek Explorer Pro and Pewatronic Explorer Pro. I began to work on it end of march with Cougar on Mame. I first found the fun bug and fixed it in the first hour (Fun bug and H8 bug are not related). I wrote the second week a "bizarre" as comment to the line generating the bug, but I moved on. After checked the move generator and the very complex time management (partially because very scattered code) without result, I found the origin of the H8 bug and I coding the patch may 28 for Cougar/Centurion (same rom). This patch is 50% more long than the patch for AT time level for the Emerald Classic Plus, so it is necessary to change ... 3 bits! Since I have fully understood the origin of the bug, I can confidently guarantee that this patch will fix all other chess computers with the H8 bug (after finding the right offsets), and this without even having seen their program yet. This bug stop quickly the search when a piece in h8 (necessary condition but not sufficient), so always be suspicious when the computer reply with a bizarre move from h8 in less than 2 seconds. Another point confirmed : the bugged code is not used with checkmate levels. The patch for the H8 bug and Fun bug together (only for Cougar/Centurion, as no others roms are available): Code:
3288 : 6b01 fe60 1c19 505e : 5a00 66d0 66d0 : 7f 52 72 60 41 50 7f 52 72 70 5a 00 50 62 New checksums are F9E68C6079F821A667A5CABECBDFCD6C01293AE7 F28806F7 if no castling is possible, you can translate the position with a vertical symetry (h8 to a8, h7 to a7..) with the same color for pieces and color to move, without a piece of the color to play in h8 (formerly in a8). If this is the case or castling exist, the last solution is to create the same position with color of pieces and color to move exchanged (so a white queen in h8 become a black queen in a1). To Saitek : Now you can make new chess computers without H8 bug ;-) Cordialy, mychess. Geändert von Mychess (09.06.2025 um 18:46 Uhr) |
Folgende 16 Benutzer sagen Danke zu Mychess für den nützlichen Beitrag: | ||
Chessguru (09.06.2025), ferribaci (10.06.2025), fhub (09.06.2025), Fluppio (10.06.2025), kamoj (10.06.2025), Lucky (10.06.2025), Mark 1 (09.06.2025), mclane (10.06.2025), MichaelN (10.06.2025), paulwise3 (10.06.2025), Robert (10.06.2025), Roberto (10.06.2025), Techtueftel (10.06.2025), Tibono (09.06.2025), udo (11.06.2025), Wolfgang2 (10.06.2025) |
|
|||||||||||
AW: THE PATCH FOR ALL CHESS COMPUTERS WITH H8 BUG
Hi Mychess,
![]() Question 1: we have many H8 engines in CB-Emu - don't any other of these engines (apart from Centurion/Cougar) have this H8 bug? Question 2: there's a difference in the Fun level bugfix between the 2 versions you've posted in your first thread and today: 66d0 : 7F 52 72 60 41 62 7F 52 72 70 5A 00 50 62 (from 31.03.2025) 66d0 : 7f 52 72 60 41 50 7f 52 72 70 5a 00 50 62 (from today) So which one is correct? Regards, Franz
__________________
Meine Webseite: https://fhub.jimdofree.com/ |
|
||||||||||||
Re: THE PATCH FOR ALL CHESS COMPUTERS WITH H8 BUG
Hi Fhub,
Question 1 : The list of computers with H8 bug come from Spacious-Mind : https://hiarcs.net/forums/viewtopic.php?f=1&t=6021, so no doubt ! Question 2 : Both are correct, this byte is a dummy byte for checksum control when you power on the computer. In the new version, it is modified to take account of the patch for H8 bug. Code:
patch for H8 bug : 3288 : 6b01 fe60 1c19 patch for Fun bug : 505e : 5a00 66d0 66d0 : 7f 52 72 60 41 50 7f 52 72 70 5a 00 50 62 Cordialy, mychess |
|
|||||||||||
AW: Re: THE PATCH FOR ALL CHESS COMPUTERS WITH H8 BUG
Hi Mychess,
66d0 : 7f 52 72 60 41 50 7f 52 72 70 5a 00 50 62 I've disassambled the code at this address with the debugger and got: Code:
66D0: 7F52 7260 bclr #6, @h'ff52 66D4: 4150 bf h'6726 66D6: 7F52 7270 bclr #7, @h'ff52 66DA: 5A00 5062 jmp h'5062 Now I wonder why did you put this 'checksum correction' byte(s) 41 50 WITHIN your bugfix code - couldn't it happen that this 'WHAT' condition is indeed false when this code is executed, and in this case the program would jump/branch to an address (6726) with no valid code? So why didn't you just put these correction bytes (41 50) at the end of your bugfix code, which would definitely never be executed? Regards, Franz
__________________
Meine Webseite: https://fhub.jimdofree.com/ Geändert von fhub (10.06.2025 um 14:31 Uhr) |
|
||||||||||||
Re: THE PATCH FOR ALL CHESS COMPUTERS WITH H8 BUG
Hi Fhub,
You can put the good byte for a good checksum at the end of the patch. However, a curious programmer (Fh..) could be astonished by a byte never adressed by the patch. So I prefer to use a dummy short instruction (yes, with 2 clocks CPU lost) with the good byte as immediate value. The BF is a "branch never", as BT is a branch always, without testing any code condition. So 41 50 is a 2 clocks cpu lost instruction who only make PC = PC+2, and 50 is the byte for a good checksum. You can make a best performance patch with : 66D0: 7F52 7260 bclr #6, @h'ff52 66D4: 7F52 7270 bclr #7, @h'ff52 66D8: 5A00 5062 jmp h'5062 66DC: 91 ; (41+50) Cordialy, Mychess |
|
|||||||||||
AW: Re: THE PATCH FOR ALL CHESS COMPUTERS WITH H8 BUG
![]() Zitieren:
The BF is a "branch never", as BT is a branch always, without testing any code condition.
But what is an instruction BF good for, when it actually never does anything? ![]() The 2 clocks CPU lost is of course no problem, because I think this bugfix code is only executed when the user changes the level (to or away from a Fun level).
__________________
Meine Webseite: https://fhub.jimdofree.com/ |
Folgender Benutzer sagt Danke zu fhub für den nützlichen Beitrag: | ||
kamoj (10.06.2025) |
|
|||||||||||
AW: THE PATCH FOR ALL CHESS COMPUTERS WITH H8 BUG
And from your "66DC: 91 ; (41+50)" I guess the program uses only a 1-byte checksum, correct?
Then why not just change the checksum byte instead of adding such a dummy byte?
__________________
Meine Webseite: https://fhub.jimdofree.com/ |
Folgender Benutzer sagt Danke zu fhub für den nützlichen Beitrag: | ||
kamoj (10.06.2025) |
|
||||||||||||
Re: THE PATCH FOR ALL CHESS COMPUTERS WITH H8 BUG
Yes, only a one byte checksum.
However, the checksum is not stored, it should be 00, so I add a byte to obtain 00. Another solution would be to delete the checksum call from the rom, but I'm follower of "Entia non sunt multiplicanda praeter necessitatem", or principle of parsimony. Cordialy, Mychess |
Folgender Benutzer sagt Danke zu Mychess für den nützlichen Beitrag: | ||
kamoj (10.06.2025) |
|
|||||||||||
AW: Re: THE PATCH FOR ALL CHESS COMPUTERS WITH H8 BUG
I remember such a situation for any other ROM that I've patched, and it actually returned an error message (I've just skipped this error routine).
__________________
Meine Webseite: https://fhub.jimdofree.com/ |
Folgender Benutzer sagt Danke zu fhub für den nützlichen Beitrag: | ||
kamoj (10.06.2025) |
![]() |
|
|
![]() |
||||
Thema | Erstellt von | Forum | Antworten | Letzter Beitrag |
Turnier: The beginnings of chess computers | Chessguru | Partien und Turniere / Games and Tournaments | 12 | 22.06.2022 09:22 |
MessEmu: A patch for the Conic Computer Chess | Mychess | Mess Emu & andere Emulationen / Mess Emu and other Emulations | 5 | 02.12.2021 23:41 |
Turnier: Hans Böhm challenges old chess computers at 30th CSVN Tournament | Ruud Martin | Partien und Turniere / Games and Tournaments | 2 | 31.05.2015 08:55 |
News: Chess Computers - The UK Story | Mike | Die ganze Welt der Schachcomputer / World of chess computers | 9 | 19.03.2009 02:03 |
News: "Chess Computers Revolution" DVD von Ismenio erschienen | Chessguru | Die ganze Welt der Schachcomputer / World of chess computers | 2 | 18.04.2007 22:52 |