Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 09:14 19 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2: TSCP Chess

     Page 6 of 6    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5705
Posted: 07:54am 21 Oct 2022
Copy link to clipboard 
Print this post

Looks like you might have found a use for the Pico Pear, Volhout. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8566
Posted: 08:03am 21 Oct 2022
Copy link to clipboard 
Print this post

It is easy to make the program communicate on UART (gp0, gp1). The book is a much bigger issue as the book program needs re-writing to either have the book in flash or support a SDcard via FatFS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3830
Posted: 09:01am 21 Oct 2022
Copy link to clipboard 
Print this post

Hi @Volhout,

Just to state the obvious, but perhaps you are blinded by enthusiasm, you are no longer talking about a chess program for the PicoMiteVGA you are talking about a bespoke chess playing computer using two Picos, one of which is running custom firmware.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5705
Posted: 09:13am 21 Oct 2022
Copy link to clipboard 
Print this post

Oh, but think of the possibilities for the PicoMite Pear, Tom. :)
The VGA chip could store chess sets on its SD card and the processing chip could store the book on SD.

I might convert Volhout to the Pear yet... :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8566
Posted: 11:27am 21 Oct 2022
Copy link to clipboard 
Print this post

Try this - I/O on both USB and UART (GP0,GP1) + full book without SDcard

chess.zip
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3490
Posted: 12:08pm 21 Oct 2022
Copy link to clipboard 
Print this post

@Peter,

Thanks, I will try this weekend. Good that you used GP0/GP1, so I can wire these to GP4/GP5 on the picomite. I realized you cannot use the exsiting wiring on the board, since it would connect RX to RX and TX to TX. The above does not conflict with the SD card/audio/VGA/PS2....

@Tom,

The MMBasic version runs fine, only it is too slow to enjoy. I tried and could not make more that 10 moves in an evening playing against it. That is no fun game play, all the waiting. Adding 4 pounds of HW, may make it into an enjoyable tool...
It is great though for games that do 1 move per day (played that once with a friend in US, where time difference makes normal play unpractical).
Edited 2022-10-21 22:13 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8566
Posted: 12:15pm 21 Oct 2022
Copy link to clipboard 
Print this post

If you want to extend the book you need to send me the lines of moves in this format as they are now compiled into the firmware

"g1f3 g8f6 c2c4 e7e6 b1c3 d7d5 d2d4 c7c6 c1g5",
"g1f3 g8f6 c2c4 e7e6 b1c3 d7d5 d2d4 c7c6 e2e3 b8d7 d1c2 f8d6",


For info, the way the book works is to match all entries in the book with the current list of moves in the game. The firmware then randomly selects between the openings that match the moves so far.
Edited 2022-10-21 23:26 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3830
Posted: 09:47pm 21 Oct 2022
Copy link to clipboard 
Print this post

  Volhout said  The MMBasic version runs fine, only it is too slow to enjoy. I tried and could not make more that 10 moves in an evening playing against it. That is no fun game play, all the waiting. Adding 4 pounds of HW, may make it into an enjoyable tool...
It is great though for games that do 1 move per day (played that once with a friend in US, where time difference makes normal play unpractical).


Yes, I understand. It's a pity there are only so many C programmers to go around on TBS as I'm sure a CSUB supported version of chess that would run acceptably on a single PicoMite must be possible - but alas I'm not volunteeering, too many windmills of my own to tilt at .

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Rickard5

Guru

Joined: 31/03/2022
Location: United States
Posts: 328
Posted: 12:05am 22 Oct 2022
Copy link to clipboard 
Print this post

  Volhout said   (played that once with a friend in US, where time difference makes normal play unpractical).
Any time you want to make it a second time, we can play online Speed Chess :) :)

I Interesting loaded up an early version of this chess app on my CMM2 and been playing it Against the Chess Engine on my Jetson Nano and their pretty evenly Matched, so much so I think my PM is Callusing with  Hans Niemann
I turned the volume on the monitor to max and could hear sound. Thanks Stanleyella
 
Rickard5

Guru

Joined: 31/03/2022
Location: United States
Posts: 328
Posted: 12:06am 22 Oct 2022
Copy link to clipboard 
Print this post

duplicate post
Edited 2022-10-22 10:06 by Rickard5
I turned the volume on the monitor to max and could hear sound. Thanks Stanleyella
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3490
Posted: 08:45am 23 Oct 2022
Copy link to clipboard 
Print this post

@Peter,

The basis is working: 2 pico's (one with your chess engine, the other a VGA picomite) on the 1.7 board. On the 3'rd socket I have connected COM1 of the chess module to COM2 of the picomite.




I use a small terminal program to route COM2 on the picomite to the console.

'setup COM2 to communicate with chess module
SetPin gp5,gp4,COM2
Open "COM2:115200" As #1

Do
'keyboard text to chess module
 a$=Inkey$
 If a$<>"" Then Print #1,a$;:Print a$;
 If a$=Chr$(13) Then Print

'feedback from chess module
 l=Loc(#1)
 If l>1 Then Print Input$(l,1);

Loop Until a$=Chr$(27) 'stop when <ESC>

The christmas project is to show the ASCII board (command "d") in graphics on the VGA screen, and provide a command interface for the player.

It plays fast.... reponse in seconds, versus minutes...

Thanks, and I'll post my progress on this thread.

Volhout
Edited 2022-10-23 18:50 by Volhout
PicomiteVGA PETSCII ROBOTS
 
andrewq
Newbie

Joined: 18/10/2022
Location: Australia
Posts: 7
Posted: 06:44am 24 Oct 2022
Copy link to clipboard 
Print this post

  bar1010 said  In the future, I would like to make modifications to this program.
1. Add higher resolution graphics, perhaps using 1280 x 1024 resolution mode in place of 800 x 600 mode
2. Create a more extensive opening book
3. Create chess variants such as Chess 960, Capablanca Chess, Wide Chess 12, and Reformed Courierspiel


Q: Would it be possible to include a function to save games as a PGN file?

I haven't actually got the chance to try out this Chess game yet, so the above question may be moot.

PS.  Can't wait to assemble my CMM2 kit and try out this version of Chess.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3490
Posted: 04:24pm 24 Oct 2022
Copy link to clipboard 
Print this post

  matherp said  Try this - I/O on both USB and UART (GP0,GP1) + full book without SDcard

chess.zip


Hi Peter,

Is there a chance to adapt the "bye" command to do a restart ? It is quiting now, but to what ?
I need a way to restart the chess engine, and the RUN pin driven from picomite will also restart picomite (pins are shared) unless I cut the board.

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8566
Posted: 05:14pm 24 Oct 2022
Copy link to clipboard 
Print this post

Here you go

chess.zip

Can I suggest you get Tom's approval for this stand-alone version. You code is then just an external GUI and requires no approval.
The TSCP code is unchanged from his website with the following minor exceptions.

Timing functions replaced by calls to Pico SDK
Book embedded in the firmware - can provide source
I/O via USB and/or UART (gp0,gp1) using Pico SDK
Bye command causes watchdog reset

NB: the RP2040 is overclocked to 378MHz but runs completely stably at this speed
Edited 2022-10-25 03:33 by matherp
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3490
Posted: 06:46pm 25 Oct 2022
Copy link to clipboard 
Print this post

@Peter,

I will contact Tom.

Here is a horror video. At 5 ply deep, the game is over in 2 minutes when it plays itself. Using Martin H.'s icons on 640x480 mode 1. No user interface yet, but only auto play. It is scaring. It plays so fast (1 move per 2 seconds with 5 ply deep), and I still have few "pause 200" statements in the communication between pico1 and pico2 to make sure I get something in the buffers.

speedchess

Focus in the beginning is bad (stupid phone)..

A game like this lasted more than 24 hours on the MMBasic version of this chess engine.

Volhout
Edited 2022-10-26 16:21 by Volhout
PicomiteVGA PETSCII ROBOTS
 
     Page 6 of 6    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024