Einzelnen Beitrag anzeigen
  #5599  
Alt 08.11.2023, 17:10
Benutzerbild von Mychess
Mychess Mychess ist offline
Saitek Leonardo
 
Registriert seit: 07.03.2009
Beiträge: 89
Abgegebene Danke: 155
Erhielt 126 Danke für 70 Beiträge
Aktivitäten Langlebigkeit
4/20 16/20
Heute Beiträge
0/3 sssssss89
Re: AW: Mess Emulator für diverse Schachcomputer ist fertig!

 Zitat von fhub Beitrag anzeigen
Hi,

Question for hap:
There's one thing I don't understand with these 2 devices: they have different key codes (ports&bits), although using exactly the same ROM program - how is this possible?
Example:
Port "IN.2" bit 0x02 is "Multi Move" for the ccompanion2, but the same port&bit is "Take Back" for the expchess!?
So if this key with port "IN.2" bit 0x02 is pressed, how can the same program know, whether it should switch to 'multi move' mode (when I'm running ccompanion2) or just 'take back' the last move (when running expchess)??
Looking at your driver I don't see any differentiation between these 2 engines - apart from the layouts and the input ports they use exactly the same machine configuration!?
The code in CC2 :
Code:
        
        ldx     #$F75C              ; 12 keys table
        ldab    #$0C                ; 12 keys counter
        tim     #$08,$Port2Data     ; test config 12/14 keys   <--------------  hardware test
        bne     LF73E     >-        ; yes for 12
        ldx     #$F76A      |       ; 14 keys table
        ldab    #$0E        |       ; 14 keys counter
LF73E:                      |       ;
        dex               <-        ; 
        decb                |       ; 
        bmi     LF7A9       |       ; end
        cmpa    $00,x       |       ; same as table ?
        bne     LF73E     >-        ; no, next
        ldx     #$F76A              ; vectors table
        abx                         ; 2 bytes for address
        abx                         ; 
        ldx     $00,x               ; loading vector
        clra                        ; a=0
        pshx                        ; in stack for jmp
        rts                         ; indirect by return
XF750:                              ;
        db      $40, $43, $44, $45  ;      14 keys     |   12 keys
        db      $80, $81, $82, $83  ;  40 FE30  Pawn   | 81  FE30
        db      $84, $85, $86, $87  ;  41 FE31  knight | 82  FE31
XF75C:                              ;  42 FE32  bishop | 86  FE32
        db      $44, $82 ,$80, $45, ;  43 FE33  rook   | 87  FE33
        db      $84, $40, $41, $83, ;  44 FE35  king   | 40  FE35
        db      $86, $81, $42, $43, ;  45 FDF3  color  | 45  FDF3
        db      $46, $85            ;  46 FD44  sound  |
XF76A:                              ;  80 FC93  New G. | 44  FC93
        db      $FE, $35, $FC, $8A  ;  81 FCBD  takebk | 85  FCBD
        db      $FC, $93, $FD, $F3  ;  82 FC8A  epos   | 43  FC8A
        db      $FE, $34, $FE, $30  ;  83 FE0B  play   | 83  FE0B
        db      $FE, $31, $FE, $0B  ;  84 FE34  queen  | 80  FE34
        db      $FD, $3F, $FC, $BD  ;  85 FE10  multmv |
        db      $FE, $32, $FE, $33  ;  86 FD3F  level  | 84  FD3F
        db      $FD, $44, $FE, $10  ;
Hacking is possible by adding 2 keys and put the pin 3 of the port 2 at Vcc.

Cordially.

Geändert von Mychess (08.11.2023 um 17:23 Uhr)
Mit Zitat antworten
Folgende 3 Benutzer sagen Danke zu Mychess für den nützlichen Beitrag:
fhub (08.11.2023), Hartmut (10.11.2023), kamoj (08.11.2023)