6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 1:14 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Jul 30, 2014 11:29 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
I found a more recent version of Peter Jennings' Microchess:
http://benlo.com/files/Microchess6502.txt
with the comment
Quote:
Updated with corrections to earlier OCR errors by Bill Forster, August 2005.

which I compared to our archived version at http://6502.org/source/games/uchess/uchess.htm

I found these differences:
Code:
JSR  GNM
instead of the commented out
Code:
;      JSR   OHM             ; CONTINUATION

Code:
CKMATE           LDX  BMAXC         
instead of
Code:
CKMATE  LDY     BMAXC                   

Code:
beq  pout25
instead of
Code:
bne     pout25         

and
Code:
cph      .byte        "KQRRBBNNPPPPPPPPKQRRBBNNPPPPPPPP"
instead of
Code:
cph             .byte   "KQCCBBRRPPPPPPPPKQCCBBRRPPPPPPPP"

There's also an ordering change which may or may not be significant:
Code:
PrintDig       AND   #$0F             
               PHY

instead of
Code:
   PrintDig       PHY                     
                  AND   #$0F             


I haven't tested or run either version.

Cheers
Ed

(Possibly via Oscar's KIM-1 adventures)


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 30, 2014 4:12 pm 
Offline

Joined: Sat Jul 28, 2012 11:41 am
Posts: 442
Location: Wiesbaden, Germany
The last 3 changes are in the modifications to drive a serial terminal. Therefore I don't think they are due to OCR decode errors.
Quote:
Code:
beq  pout25
instead of
Code:
bne     pout25         
reverses the way empty white or black space is displayed. White is now displayed as two asterisks while black is displayed as two blanks. Was originally reversed. What you need really depends on wether you have a black on white or white on black terminal.
Quote:
Code:
cph      .byte        "KQRRBBNNPPPPPPPPKQRRBBNNPPPPPPPP"
instead of
Code:
cph             .byte   "KQCCBBRRPPPPPPPPKQCCBBRRPPPPPPPP"

seemed to show rook=C & knight=R, maybe for another language. Now it is rook=R, bishop=B & knight=N.

And of course the last change is not significant, as Ed already said. However, I have replaced the hex nibble output in my code anyway. Was:
Code:
PrintDig       AND   #$0F              ;  prints A hex nibble (low 4 bits)
               PHY
               TAY                     ;
               LDA   Hexdigdata,Y      ;
               PLY
               jmp   syschout          ;

Hexdigdata   asc   "0123456789ABCDEF"
Gets rid of the table:
Code:
PrintDig       AND   #$0F              ;  prints A hex nibble (low 4 bits)
               CMP   #$0A              ; >9 ?
               BCC   PrDA              ; No
               ADC   #$06              ; A-F
PrDA           ADC   #$30              ; +"0"
               jmp   syschout          ;

The other fixes may be significant for the strategic behavior of the program as JSR GNM calls "generate move" for strategic analysis and loading BMAXC (black max count) to the wrong register may not be able to detect a potential checkmate against black properly.

_________________
6502 sources on GitHub: https://github.com/Klaus2m5


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 30, 2014 4:23 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Thanks for the analysis! It's good to do without the C02 opcodes too.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: