Schachcomputer.info Community
  #1  
Alt 21.11.2023, 10:54
Benutzerbild von Mychess
Mychess Mychess ist offline
MACH III
 
Registriert seit: 07.03.2009
Beiträge: 128
Bilder: 3
Abgegebene Danke: 201
Erhielt 266 Danke für 110 Beiträge
Member Photo Albums
Aktivitäten Langlebigkeit
4/20 16/20
Heute Beiträge
1/3 ssssss128
Re: AW: Re: Codeanalyse

 Zitat von Hans21 Beitrag anzeigen
Hello Mychess,

The idea with this table sounds convincing to me. However, so far I have failed to locate this table in the Sensory 9-code that I use.

Hans
Hello Hans,

Table discovered in 2007 (date noted, I'd had a hard time!), it took me 2 hours this morning to work out where I'd got it from (no comment, so obvious when you've found it, but 16 years later...).
Use of chained sub-chains probably to save space in rom.
The starting point is #$33, $C133 returns #$43, $C143 returns #$34, $C134 returns #$44...

Cordially.
Mit Zitat antworten
Folgende 3 Benutzer sagen Danke zu Mychess für den nützlichen Beitrag:
kamoj (21.11.2023), Moonshine (21.11.2023)
  #2  
Alt 21.11.2023, 11:40
user_2141
Gast
 
Beiträge: n/a
Aktivitäten Langlebigkeit
0/20 0/20
Heute Beiträge
sssssssss
AW: Codeanalyse

Hello Mychess,

Thanks a lot for the hint.

That sure is a tough one. This I have to digest first.

Did they need to save memory space or is that just "obfuscation"?

(In my opinion the memory at the start of 0xc000 is not utilized very economically, but I might be completely wrong).

Best regards

Hans
Mit Zitat antworten
Folgender Benutzer sagt Danke zu für den nützlichen Beitrag:
kamoj (21.11.2023)
  #3  
Alt 21.11.2023, 12:25
Moonshine Moonshine ist offline
Super System III
 
Registriert seit: 25.07.2010
Land:
Beiträge: 14
Abgegebene Danke: 28
Erhielt 21 Danke für 11 Beiträge
Aktivitäten Langlebigkeit
4/20 15/20
Heute Beiträge
0/3 sssssss14
Lächeln AW: Re: AW: Re: Codeanalyse

 Zitat von Mychess Beitrag anzeigen
Hello Hans,

Table discovered in 2007 (date noted, I'd had a hard time!), it took me 2 hours this morning to work out where I'd got it from (no comment, so obvious when you've found it, but 16 years later...).
Use of chained sub-chains probably to save space in rom.
The starting point is #$33, $C133 returns #$43, $C143 returns #$34, $C134 returns #$44...

Cordially.
Hello Mychess

thank you very much. I also found this table in Sargons 4.0 ROM.

Hannes

Geändert von Moonshine (22.11.2023 um 00:04 Uhr)
Mit Zitat antworten
  #4  
Alt 21.11.2023, 14:12
Tibono Tibono ist offline
Resurrection
 
Registriert seit: 22.05.2018
Ort: Frankreich
Alter: 63
Land:
Beiträge: 619
Abgegebene Danke: 4.126
Erhielt 1.451 Danke für 496 Beiträge
Aktivitäten Langlebigkeit
7/20 7/20
Heute Beiträge
1/3 ssssss619
AW: Re: AW: Re: Codeanalyse

 Zitat von Moonshine Beitrag anzeigen
Hello Cordially, (...)
Hannes
Hi Hannes,
at end of a letter or post, 'cordially' (or 'cordially yours') is an alternative to e.g. 'best regards'. Not a nickname

Schönen Gruß,
Eric
Mit Zitat antworten
Folgender Benutzer sagt Danke zu Tibono für den nützlichen Beitrag:
Moonshine (21.11.2023)
  #5  
Alt 21.11.2023, 17:24
Moonshine Moonshine ist offline
Super System III
 
Registriert seit: 25.07.2010
Land:
Beiträge: 14
Abgegebene Danke: 28
Erhielt 21 Danke für 11 Beiträge
Aktivitäten Langlebigkeit
4/20 15/20
Heute Beiträge
0/3 sssssss14
Lächeln AW: Codeanalyse

Hello Tibono,

thanks for the tip. I didn't know that!

Hannes
Mit Zitat antworten
  #6  
Alt 22.11.2023, 11:05
user_2141
Gast
 
Beiträge: n/a
Aktivitäten Langlebigkeit
0/20 0/20
Heute Beiträge
sssssssss
AW: Codeanalyse

Hallo Hannes,
Meine frühere Nachricht dazu ging offenbar verloren.
Ich habe bemerkt, dass CB-Emu eine vollständige Debugger-Umgebung enthält. Ich werde das mal ausprobieren.
Hans
Mit Zitat antworten
Folgender Benutzer sagt Danke zu für den nützlichen Beitrag:
Moonshine (22.11.2023)
  #7  
Alt 22.11.2023, 18:37
Moonshine Moonshine ist offline
Super System III
 
Registriert seit: 25.07.2010
Land:
Beiträge: 14
Abgegebene Danke: 28
Erhielt 21 Danke für 11 Beiträge
Aktivitäten Langlebigkeit
4/20 15/20
Heute Beiträge
0/3 sssssss14
AW: Codeanalyse

 Zitat von Hans21 Beitrag anzeigen
Hallo Hannes,
Ich habe bemerkt, dass CB-Emu eine vollständige Debugger-Umgebung enthält. Ich werde das mal ausprobieren.
Hans
Hallo Hans,

kannst Du mir bitte Näheres zu dieser Debugger-Umgebung sagen? Das würde mich auch sehr interessieren.
Danke und Lg

Hannes
Mit Zitat antworten
  #8  
Alt 22.11.2023, 19:03
Benutzerbild von Mychess
Mychess Mychess ist offline
MACH III
 
Registriert seit: 07.03.2009
Beiträge: 128
Bilder: 3
Abgegebene Danke: 201
Erhielt 266 Danke für 110 Beiträge
Member Photo Albums
Aktivitäten Langlebigkeit
4/20 16/20
Heute Beiträge
1/3 ssssss128
Re: Codeanalyse

Hello,

About the sensory 9 opening library :

- Subroutine F291 looks for a next move in the library and tests whether it is the same one that has been played.
If so, finish, if not, then test its brothers.
If they are all different or no brothers, end library.
Code:
                                                                                                                 
F291 :   jsr     LF2D5    ; F2D5 search for next move and detect brother move and/or end of variant.
F294 :   cmp     X009B                                                                                                
F296 :   beq     LF2A2                                                                                                
F298 :   jsr     LF2F2     ; F2F2 brother processing, and in some cases #$Cx jump over x bytes, x from 0 to 7.
F29B :   bcc     LF291     ; another brother                                                                                             
F29D :   lda     #$FF       ; out of library                                                                                          
F29F :   sta     X009A      ; in flag                                                                                           
F2A1 :   rts
- F2A2 browses the library.
Check that you are not already out of the library.
If code #$C4, no hit and end of library.
If code #$C2, it is a jump, 2 following bytes are the address (if null address, end of library).
Otherwise normal move.

The Sensory 9 has a special mode (F5) that allows this library to be extended to less good moves.



Cordially.

Geändert von Mychess (22.11.2023 um 19:22 Uhr)
Mit Zitat antworten
Folgende 3 Benutzer sagen Danke zu Mychess für den nützlichen Beitrag:
kamoj (22.11.2023), Moonshine (22.11.2023)
  #9  
Alt 22.11.2023, 19:45
user_2141
Gast
 
Beiträge: n/a
Aktivitäten Langlebigkeit
0/20 0/20
Heute Beiträge
sssssssss
AW: Re: Codeanalyse

 Zitat von Mychess Beitrag anzeigen
Hello,

About the sensory 9 opening library :

- Subroutine F291 looks for a next move in the library and tests whether it is the same one that has been played.
If so, finish, if not, then test its brothers.
If they are all different or no brothers, end library.
Code:
                                                                                                                 
F291 :   jsr     LF2D5    ; F2D5 search for next move and detect brother move and/or end of variant.
F294 :   cmp     X009B                                                                                                
F296 :   beq     LF2A2                                                                                                
F298 :   jsr     LF2F2     ; F2F2 brother processing, and in some cases #$Cx jump over x bytes, x from 0 to 7.
F29B :   bcc     LF291     ; another brother                                                                                             
F29D :   lda     #$FF       ; out of library                                                                                          
F29F :   sta     X009A      ; in flag                                                                                           
F2A1 :   rts
- F2A2 browses the library.
Check that you are not already out of the library.
If code #$C4, no hit and end of library.
If code #$C2, it is a jump, 2 following bytes are the address (if null address, end of library).
Otherwise normal move.

The Sensory 9 has a special mode (F5) that allows this library to be extended to less good moves.



Cordially.
Hello Mychess,

Great. Thanks a lot!

In Ghidra, as well an in the CB-Emu-Debugger I have the Sensory 9-1.6 MHz-ROM. There I have found it, but at a higher address, namely

LAB_f346 XREF[1]: f350(j)
f346 20 8a f3 JSR FUN_f38a undefined FUN_f38a()
f349 c5 9b CMP DAT_009b
f34b f0 0a BEQ LAB_f357
f34d 20 a7 f3 JSR FUN_f3a7 undefined FUN_f3a7()
f350 90 f4 BCC LAB_f346
f352 a9 ff LDA #0xff
f354 85 9a STA DAT_009a
f356 60 RTS

I guess it is the same.
Am I right?

Best regards

Hans
Mit Zitat antworten
Folgender Benutzer sagt Danke zu für den nützlichen Beitrag:
kamoj (22.11.2023)
  #10  
Alt 22.11.2023, 19:31
user_2141
Gast
 
Beiträge: n/a
Aktivitäten Langlebigkeit
0/20 0/20
Heute Beiträge
sssssssss
AW: Codeanalyse

Hallo Hannes,

Ich öffne auf meiner Linux-Maschine eine Kommandozeile und gehe ins Verzeichnis wo "CB-Emu.exe" liegt.

Dort gebe ich den Befehl
"wine CB-Emu.exe -debug fscc9a1"
ein.

"fscc1a" ist in der letzen CB-Emu-Version der Name für das Sensory 9-1.6MHz-Gerät.

Auf einer Windows-Machine sollte es ähnlich gehen, einfach ohne "wine", also:
"CB-Emu.exe -debug fscc9a1"

Du siehst dann neben dem Brett eine Debug-Konsole. Die Anleitung dazu steht in "https://docs.mamedev.org/" unter "Mame Debugger".

Man kann sich dann z.B. auch in Echtzeit den RAM-Inhalt anzeigen lassen.
Allerdings habe ich mir bis jetzt noch keinen Reim darauf machen können, wie das Brett und die Figuren kodiert sind. Vielleicht findest du das raus.

Hans

 Zitat von Moonshine Beitrag anzeigen
Hallo Hans,

kannst Du mir bitte Näheres zu dieser Debugger-Umgebung sagen? Das würde mich auch sehr interessieren.
Danke und Lg

Hannes

Geändert von user_2141 (22.11.2023 um 19:51 Uhr)
Mit Zitat antworten
Folgender Benutzer sagt Danke zu für den nützlichen Beitrag:
kamoj (22.11.2023)
Antwort

Themen-Optionen
Ansicht

Forumregeln
Du bist nicht berechtigt, neue Themen zu erstellen.
Du bist nicht berechtigt, auf Beiträge zu antworten.
Du bist nicht berechtigt, Anhänge hochzuladen.
Du bist nicht berechtigt, deine Beiträge zu bearbeiten.

BB code ist An
Smileys sind An.
[IMG] Code ist An.
HTML-Code ist An.

Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 10:40 Uhr.



Powered by vBulletin (Deutsch)
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
©Schachcomputer.info