News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Duke

Amstrad CPC WiFi

Started by Duke, 07:36, 07 May 16

Previous topic - Next topic

0 Members and 6 Guests are viewing this topic.

Duke

Quote from: DerSchatten on 18:56, 12 August 16
XMEM disconnected, SD-Card formated and i save the new IP-Configuration on SD-Card.
Flash FW3.15-EN and BASIC 1.1

The same. Ready...  and hangs.
Just re-tested here with v1.0.8.
It seems you need to use basic 1.1 rom from 6128 not 664 (with 664 basic 1.1 I got no cursor too).
I use FW3.16UK32


Duke

Uploading CPC664 lowerrom + basic rom works fine, so I guess there is some difference between basic 1.1 rom from 664/6128 that FW3.16 relies on.

DerSchatten

YES! Thats it! V1.1 from CPC 6128 works!
Very Thanks!  :D

Prodatron

#628
Quote from: Duke on 13:53, 07 August 16Started adding a bit of NET API, for now only TCP/IP functions (client), max. 8 connections. Probably full of bugs :)
Functions added so far:
C_NETSOCKET    equ &4331
C_NETCONNECT    equ &4332
C_NETCLOSE    equ &4333
C_NETSEND        equ &4334
C_NETRECV        equ &4335
C_NETHOSTIP    equ &4336


Duke, thanks a lot for adding these commands, seems to be exactly what is missing for Z80 based network applications!
I have a few questions:
- are there any buffers for incoming/outgoing data? If yes, would it be possible to add a command for reading the buffer status?
- regarding the receive command; maybe I didn't get it correctly, but what happens if you request more data than which has been received? Will it wait forever?
- what's about a status command in general? "Connection status", "new data received"...
- and of course it would be nice if there would be a listen command as well :) (for implementing server apps)

To complete this UDP support would be nice, too, but since you already implemented DNS lookup on your side anyway, and DHCP is already done at the beginning I don't see so much sense in UDP support for the beginning.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Prodatron

Quote from: Duke on 13:53, 07 August 16
Download the sample telnet client source code below.
This is a total hack, with hardcoded IP/port and you cannot use del key.
I have not read any RFC's regarding telnet, so just a quick and dirty implementation (works with my router, maybe not much else).
For anyone wanting to make a proper telnet client, feel free to use this as you wish:
GitHub - M4Duke/telnet: Example telnet client for M4board

We tried the Telnet client today on Octoates CPC (currently on the EVoke Demoparty) and it is crashing unfortunately. Maybe we didn't assemble it correctly. Could you provide the BIN as well? (we also replaced the domain with another one, "telehack.com", same result)

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Duke

#630
Quote from: Prodatron on 12:10, 13 August 16

Duke, thanks a lot for adding these commands, seems to be exactly what is missing for Z80 based network applications!
I have a few questions:
- are there any buffers for incoming/outgoing data? If yes, would it be possible to add a command for reading the buffer status?
- regarding the receive command; maybe I didn't get it correctly, but what happens if you request more data than which has been received? Will it wait forever?
- what's about a status command in general? "Connection status", "new data received"...
- and of course it would be nice if there would be a listen command as well :) (for implementing server apps)

To complete this UDP support would be nice, too, but since you already implemented DNS lookup on your side anyway, and DHCP is already done at the beginning I don't see so much sense in UDP support for the beginning.
There is a buffer for incoming data, which you "empty" using the recv command, you cannot receive more than in the buffer (which currently is only 2KB per socket, I may allocate some more space later). Actually I am considering mapping another rom for receive buffers.
Recv is non blocking, meaning it will not wait, if there is no data in the buffer, it returns 0 in received data  size and if you request more than there is you only get what there is which again is written to received data size (response buf[3+1..2]). Later I will make send and connect non blocking too.
As for the telnet example, its just compiled with Maxam 1.5 and source loaded via Protext v1.25, the domain name, is not used (it's commented out, but was to illustrate how to use the dns lookup). You should edit the IP number (30,0,0,10 -> "10.0.0.30" to whatever you wish to connect to, or enable the domain name lookup.

line 274..
csocket:      db   &0
                  db   30,0,0,10      ; ip addr http://10.0.0.30  <-- change here
                  dw   23         ; port number

anyf33

Quote from: Duke on 13:53, 07 August 16
V1.0.9 BETA. Get it here: http://www.spinpoint.org/cpc/M4FIRM_v109b.zip

Started adding a bit of NET API, for now only TCP/IP functions (client), max. 8 connections. Probably full of bugs :)
Functions added so far:
C_NETSOCKET    equ &4331
C_NETCONNECT    equ &4332
C_NETCLOSE    equ &4333
C_NETSEND        equ &4334
C_NETRECV        equ &4335
C_NETHOSTIP    equ &4336

Here is a small telnet client demo I was able to make with these:


Download the sample telnet client source code below.
This is a total hack, with hardcoded IP/port and you cannot use del key.
I have not read any RFC's regarding telnet, so just a quick and dirty implementation (works with my router, maybe not much else).
For anyone wanting to make a proper telnet client, feel free to use this as you wish:
GitHub - M4Duke/telnet: Example telnet client for M4board

I haven't documented the new functions yet, but hopefully the above source will provide enough info for now.
hello again Duke.
my amstrad's works fine with your board. but how can i use telnet client on my CPC? Thank you.

Duke

Quote from: anyf33 on 22:05, 13 August 16
hello again Duke.
my amstrad's works fine with your board. but how can i use telnet client on my CPC? Thank you.
The telnet client is not very usable right now, it was mostly meant as a proof of concept and example for other developers.
I hope someone will pick up on it and write a better version, with a bit of gui, proper dealing with the negotiation protocol, input field for server hostname or ip address, port no, handle keyboard control keys, delete key etc :)
For my short sample you will have to assemble it like I do in the video, but first edit the IP number in line 275 to reflect the IP number you want to telnet to.

myrsky

Hi again...

After a deeper cleaning of the 464 connector with isopropyl alcohol, eraser and M4 fw update WORKS!

Now my problem is loading games, trying to load bruce lee i use the following RUN"BRUCEL~2.DSK" after hit enter CPC shows "File is already open", thats happend with all games, i think/need to enter to the .DSK but using the command |cd,"xxx.DSK" CPC shows "Type mismatch"

Any ideas? Thanks.

PS: I hope my explanation is understandable =)

Duke

#634
Good :)
Yes the problem is you are using Basic 1.0, with Basic 1.0 you cannot pass parameters directly to RSX commands, so instead you have to do.
a$="BRUCEL~2.DSK"
|CD,@a$

Or just type |CD and press enter, then write or use shift+cursor keys+copy to get the dsk name, followed by enter.

After you have done that, type cat and run the correct file as it was a normal disc.

However the best solution is to upload lower rom from CPC6128 and basic rom from CPC6128 or the alternative FW3.16 (look a few posts back to see how thats done).
This way your CPC464 will be upgraded to Basic 1.1 and you can pass parameters to RSX commands, ie. |CD,"BRUCEL~2.DSK".

Lastly, dont forget to map M4 rom as number 7 now you are using CPC464, this will provide best compatiblity with games.


Quote from: myrsky on 01:01, 14 August 16
Hi again...

After a deeper cleaning of the 464 connector with isopropyl alcohol, eraser and M4 fw update WORKS!

Now my problem is loading games, trying to load bruce lee i use the following RUN"BRUCEL~2.DSK" after hit enter CPC shows "File is already open", thats happend with all games, i think/need to enter to the .DSK but using the command |cd,"xxx.DSK" CPC shows "Type mismatch"

Any ideas? Thanks.

PS: I hope my explanation is understandable =)

myrsky

@Duke

Game loaded with success with this commands, thank you!

I was reading the post about update 464 to basic 1.1 but i dont know how to manage all this files and M4 rom slots.

rcmolina

Hi,


Any roadmap to get a file browser in rom, or anyone knows an utility to put in the sdcard to navigate, similar for instance to fb64 inn sdiec (C64)


-
Rafael

Duke

@myrsky : Check the documentation here: http://www.spinpoint.org/cpc/m4info.txt and the info's about it in this thread, should be easy.

@rcmolina : There is no quick browser/launcher yet for the m4 fatfs filesystem. If nobody else makes one, I may do it sometime, would be a nice weekend project.

MiguelSky

Duke, I have a suggestion/request for |DIR command: it's a bit annoying when you list a directory and there is a lot of files/folders into it as there is no way to abort the listing. BonnyDOS' |CAT command let you push spacebar everytime you want to freeze the listing: if you press space bar again, listing continues; if you push Return, listing aborts.

Duke

@MiguelSky: Noted, will add it next time I make an upgrade, should be very easy to add.

myrsky

@Duke

Configuration is only wireless? I dont have any wifi network here to test now.

Duke

Quote from: myrsky on 19:34, 14 August 16
@Duke

Configuration is only wireless? I dont have any wifi network here to test now.
Some parts are (lowerrom and mappings). You could manually edit the romslots/romconfig files though.

I have attached predefined romslots.bin and romconfig.bin, if you copy these two files into m4 directory (from root) via pc and start up the cpc you will have basic 1.1 and fw316 in lowerrom, besides M4 rom is set to 7 (so not suitable for some regular CPC6128's).
If you get tired of them, simply delete the files again from m4 directory.

Prodatron

Quote from: Duke on 15:23, 13 August 16Later I will make send and connect non blocking too.
TBH I can't find any "blocking" code in the Telnet source code. "sendcmd" returns directly after sending all data to the M4, and after each sendcmd you are reading the results immediately.

(I sent you an email with several questions regarding the network API some minutes ago as well :) )

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Duke

Quote from: Prodatron on 13:53, 15 August 16
TBH I can't find any "blocking" code in the Telnet source code. "sendcmd" returns directly after sending all data to the M4, and after each sendcmd you are reading the results immediately.

(I sent you an email with several questions regarding the network API some minutes ago as well :) )

Not received, the email via forum doesn't work for the time being... I'll pm you my email address.

Prodatron

Thanks, email sent!...

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

myrsky

#645
Quote from: Duke on 05:30, 15 August 16
Some parts are (lowerrom and mappings). You could manually edit the romslots/romconfig files though.

I have attached predefined romslots.bin and romconfig.bin, if you copy these two files into m4 directory (from root) via pc and start up the cpc you will have basic 1.1 and fw316 in lowerrom, besides M4 rom is set to 7 (so not suitable for some regular CPC6128's).
If you get tired of them, simply delete the files again from m4 directory.

Ill try it this night in some spare time but thanks for all =)

Edit:

Tested but 464 enter on a infinite loop of resets most of the time, the only times i could put a game the sound was corrupt.

DaDMaN

Hi @Duke


The board arrived yesterday.  ;D ;D ;D ;D ;D ;D ;D ;D :D :D :D :D :D


Thanks for your hard work and your effort.


Cheers,


DaDMaN.

TFM

Quote from: MiguelSky on 18:49, 14 August 16
Duke, I have a suggestion/request for |DIR command: it's a bit annoying when you list a directory and there is a lot of files/folders into it as there is no way to abort the listing. BonnyDOS' |CAT command let you push spacebar everytime you want to freeze the listing: if you press space bar again, listing continues; if you push Return, listing aborts.


X-DDOS allows ESC to be pressed to stop listing. 2nd ESC stops listing. Any other key continues listing. IMHO favorable ;-)

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

MiguelSky

Yes, I think using ESC key would be perfect too.

Duke

#649

V1.0.9b2  - Downloadable here: http://www.spinpoint.org/cpc/M4FIRM_v109b2.zip
Changes:
* Added ESC check to cat/|dir.
* All NETAPI made non-blocking (refer to new telnet sample for details, GitHub - M4Duke/telnet: Example telnet client for M4board).
* Lots of bugfixes in NETAPI.

Number of sockets decreased to 4 and receive buffers for each socket increased to 4KB (but keep transfer at once to 2KB due to response buffer).
Source code for M4rom was updated too: GitHub - M4Duke/m4rom: M4 Board, z80 rom part  with new socket status array.

Powered by SMFPacks Menu Editor Mod