Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:34 22 Nov 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 7 of 7    
Author Message
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4212
Posted: 08:50am 13 Nov 2024
Copy link to clipboard 
Print this post

Hi Martin,

These are beautiful, but since I am running the graphics in VGA mode 1, I can only use  solid pieces, otherwise the board field color shines through.

I will scale the sprites when it becomes an issue. I think the board fields are 48x48 to line up with the 8x12 mode 1 color tiles. And the current set of sprites I have are 40x40 or so.

When I would use the 2350 I could use a different VGA mode (3), and get rid of the color tiles.

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 09:52am 13 Nov 2024
Copy link to clipboard 
Print this post

  Volhout said  Kevin,

Finally picked up the dual pico chess project again.
It is far from finished, but can play a decent match already. Runs in 640x480 on the PRP2040 VGA.

The second pico runs Peters compiled TSCP (2 posts back). Its useds UART at GP0/GP1, and is wired to the UART on the first pico at GP4/GP5. Since this TSCP pico is very sensitive to typing errors I pre-process every command in the first pico.

Volhout


Hi Harm,
Having now got several Picomites in various forms, I should be able to simply connect 2 of them together, using GP4/5 and GP0/1 and try to get your speedy version running.
I'm hopefully buying one of Peters spare 2350 boards soon, so I'll give it a go then.
When you think you've got a stable version, upload it and I'll give it a go. :-)
Regards, Kevin.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4212
Posted: 11:57am 13 Nov 2024
Copy link to clipboard 
Print this post

Hi Kevin,

Hate to do this since it is in development stage. But I do appreciate you testing it a bit. I did not process all the feedback from TSCP yet (i.e. when chess mate and such).
I mainly test the 'auto' command (let it play itself).

known bug: When the match exceeds 74 moves it overwrites the second column in the score chart. And when TSCP plays itself, it is not uncommon to reach 74 moves. TSCP does not give up easilly, even when it is hopeless.

chess_V08.zip

So just to be clear: this is the GUI only. The chess engine is a second Pico. The second pico wires to this pico:

This PICO       Chess Pico
GND --------------- GND
GP5 --------------- GP0
GP4 --------------- GP1

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 03:16pm 13 Nov 2024
Copy link to clipboard 
Print this post

Hi Harm,
I was idly thinking about this and it dawned on me that all I actually need is a bare Pico RP2040, (of which I have a few, or even a Stamp), loaded up with Peters compiled TSCP, with 2 wires on GP0 GP1 going to any of the COM ports on the second "display" Pico, and power? this could quite easily be squeezed into an existing case and left permanently powered, if no power switch is easily available.
Then modify
 SetPin gp5,gp4,COM2
to the appropriate GP pins on the "Display" Pico and that's it?
Quick and simple Chess computer.
It may not be a rush job though, I've got chores!
Regards, Kevin.
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 03:21pm 13 Nov 2024
Copy link to clipboard 
Print this post

  Volhout said  Hi Martin,

These are beautiful, but since I am running the graphics in VGA mode 1, I can only use  solid pieces, otherwise the board field color shines through.

Hi Harm,
Of course you are right. In my example the Spritesize is 48 by 48 so we have per sprite 6 tiles wide and 4 tiles high.
I can try to adjust the sprites so that the BG-colour changes only affect the outer area tiles of the figure (like the ZX Spectrum used to)  



I'll give that a try
Cheers
Martin
Edited 2024-11-14 01:24 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4212
Posted: 03:25pm 13 Nov 2024
Copy link to clipboard 
Print this post

Correct,

Unless you want to try Peter's new 2350 code. Then you need a pico2.
But on the display pico you loose access to the GPIO pins that are soldered to the chess pico. Unless you unplug these when not playing.

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9084
Posted: 03:46pm 13 Nov 2024
Copy link to clipboard 
Print this post

Update version for the RP2350 - now includes the book


chessRP2350.zip


Not tested with the gui
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9084
Posted: 04:39pm 13 Nov 2024
Copy link to clipboard 
Print this post

Harm

Have you posted the chess pieces anywhere?
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4212
Posted: 05:01pm 13 Nov 2024
Copy link to clipboard 
Print this post

@Peter,

The tiles. Only half the folder is used. But I did not clean up yet.

Tiles.zip

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9084
Posted: 05:47pm 13 Nov 2024
Copy link to clipboard 
Print this post

Thanks - works when I type "on" each time but I get an error when I type a move e.g.d2d4

  Quote  [117] If Instr(respons$(n-1),"Computer") Then
Error : Dimensions


Also there are case issues with the filenames when they are copied to the A: drive
Edited 2024-11-14 03:48 by matherp
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4212
Posted: 06:15pm 13 Nov 2024
Copy link to clipboard 
Print this post

Hi Peter,

Yes, it is not finished. Although Computer is a strange fault.
You should be able to type "auto"

I run from B:/ so thanks for finding that.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4212
Posted: 12:22pm 14 Nov 2024
Copy link to clipboard 
Print this post

@Peter, Kevin,

I am sorry to have bothered you with such bad support.
This version plays. It fixes Peters bugs, but it is not flawless.

known bugs:
- end game not detected
- incidental, when you enter a completely valid move, the computer decides to move for you. This is probably becuase the string send to it is not correct.
- a game more then 74 moves overwrite the score card

Cosmetic changes are needed as well.

chess2pico_v09.zip

It is not finished.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 01:49pm 14 Nov 2024
Copy link to clipboard 
Print this post

Hi Harm,
No problem at all, it did allow me to get up a connection and prove I could do what I was doing and make it work. :-)
I've actually knocked up a PicoChess Dongle. ie a RP2040 with TSCP installed, with 4 wires, Gnd, Pwr, GP0, GP1, with a connector on the end, that plugs onto the appropriate connector that comes out of the "Display" Pico, which has GPIO and power on it. :-) As it happens I only had access to GP0 and GP1, for COM, so I'm using COM1, (GP0 to GP1 and GP1 to GP0) I have just loaded your V09 and set it on AUTO, and it's currently happily playing against itself. :-)
Thanks Kevin.
Edited 2024-11-15 00:36 by Bleep
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 02:41pm 14 Nov 2024
Copy link to clipboard 
Print this post

Peter,
Back in the day, when we were doing this all in Basic, Bar sent me a much more complete and detailed 'book' I think the original was about 19K, this one is 107K it's probably too big to fit on either 2040 or 2350, but if it will fit and you think it is worth while... and always assuming you are not already using it?
Regards Kevin.

bookbig.txt.zip
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 02:55pm 14 Nov 2024
Copy link to clipboard 
Print this post

Harm,
Here the sprites are adapted to the edges of the tiles, each sprite is 48x48 pixels, i.e. 6 tiles wide and 4 tiles high. The highlights can, as they are on other tiles, be set independently of the colour of the playing field


enlarged here for clarity


so, in Mode1 it could look like this:


Edited 2024-11-15 02:13 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4212
Posted: 04:18pm 14 Nov 2024
Copy link to clipboard 
Print this post

Looks nice, the queen is a bit out of scale. How high is the actual piece? In case it is 36 pix, you can use a trick to place it in the centre of the field, and offset the playfield 6 pixels down.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 05:38pm 14 Nov 2024
Copy link to clipboard 
Print this post

  Volhout said  Looks nice, the queen is a bit out of scale. How high is the actual piece? In case it is 36 pix, you can use a trick to place it in the centre of the field, and offset the playfield 6 pixels down.


  Martin H. said   each sprite is 48x48 pixels, i.e. 6 tiles wide and 4 tiles high. The highlights can, as they are on other tiles, be set independently of the colour of the playing field

no, sadley they couldn't be moved pixelwise, the appearance depends on their position on the tiles
Edited 2024-11-15 03:39 by Martin H.
'no comment
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9084
Posted: 05:39pm 14 Nov 2024
Copy link to clipboard 
Print this post

Here are the latest tcsp versions for the RP2040 and RP2350. This is now running version 1.82 (previous version was 1.81)


tscpPICO.zip

Both versions have the 2014 entry book

Harm: If I play the log only shows the computer's moves and not mine

The in-built benchmark takes 14.5 seconds on the RP2040 (396MHz) and 8.1 seconds on the RP2350  (480MHz)
Edited 2024-11-15 04:16 by matherp
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 07:24pm 14 Nov 2024
Copy link to clipboard 
Print this post

Thanks Peter,
I'm just testing the 2040 version now, thanks for including the bigger book, :-) so far in auto it seems to be behaving fine.

Harm,
One problem I have been noticing, when using 'auto', randomly, after a few moves, the client just stops, goes back to the prompt, with no error, as though it has finished with no errors, but the game is nowhere near complete, it seems to terminate faster, but this may be my imagination, if I first set a depth, with say 'sd 4' before doing 'auto' I assume the TSCP is giving some unexpected response?
Regards, Kevin.
Yes it appears to be exiting with a error number hlt=5, if I increase the size of response$ it reduces the problem.
Edited 2024-11-15 20:42 by Bleep
 
     Page 7 of 7    
Print this page


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

© JAQ Software 2024