General Category > Programming

CPChessNet [developing]

(1/22) > >>

Joseman:

Here it is!!

CPChessNET 1.6b

http://www.cpcwiki.eu/forum/programming/cpchessnet-(developing)/?action=dlattach;attach=25021

[old]
Hi

I have been working on a Chess program for the CPC.

The idea is to use the M4 to connect 2 cpc via tcp/ip and the people can play chess all over the world!

At this point I can start to code the Net part of the program, the problem is that i have no idea.

The game doesn't use firmware, doesn't use ints, only pure (sloppy) asm :)

@Duke can you help me with the m4 and the process to access the hardware to make a connection between 2 cpcs?

I never coded any client/server tcp/ip program, i suspect that with the M4 is easy... how can i start?

thankyou!

1 pic of the program:

Duke:
Good idea :)


--- Quote from: Joseman on 01:36, 03 March 18 ---@Duke can you help me with the m4 and the process to access the hardware to make a connection between 2 cpcs?

I never coded any client/server tcp/ip program, i suspect that with the M4 is easy... how can i start?

--- End quote ---

Start by playing with the samples I made at:
https://github.com/M4Duke/M4examples

There's "tcp.s" which is a tcp/ip client. Run this on one CPC.
On another CPC run "tcpserv.s" which is a tcp/ip server.

This is the basics you need to transfer moves from one CPC to another. And probably the simplest method.
In your chess game, you would have to select if you want to be "host" (server) or join a server (be client).

You can also use the PC server (main.c) for some tests to understanding how it works. Advantage with that is you can install the awesome Wireshark program and monitor all packets closely.

Anyway have a look and I will be glad to help if there's anything.

Joseman:
hi @Duke

Thanks for the help!

seems very easy to make it, i'm trying it

one question,  when you read the buffer of the m4, how can you know the end of the buffer on every command?

thanks!!

Duke:

--- Quote from: Joseman on 15:41, 03 March 18 ---one question,  when you read the buffer of the m4, how can you know the end of the buffer on every command?

--- End quote ---

(socket*16)+2    received: (2 bytes)    - data received in internal buffer (ready to get with C_NETRECV)

Once there is nothing in the incoming buffer (00 00)

Gryzor:
You're doing a chess game? Respect.

Navigation

[0] Message Index

[#] Next page

Go to full version
Powered by SMFPacks Media Embedder
Powered by SMFPacks Alerts Pro Mod
Powered by SMFPacks Mentions Pro Mod