Author Topic: Amstrad CPC WiFi  (Read 330588 times)

0 Members and 2 Guests are viewing this topic.

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.138
  • Country: dk
    • spinpoint.org
  • Liked: 1226
  • Likes Given: 918
Re: Amstrad CPC WiFi
« Reply #625 on: 21:19, 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


Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.138
  • Country: dk
    • spinpoint.org
  • Liked: 1226
  • Likes Given: 918
Re: Amstrad CPC WiFi
« Reply #626 on: 21:23, 12 August 16 »
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.

Offline DerSchatten

  • CPC464
  • **
  • Posts: 38
  • Country: 00
  • Liked: 2
  • Likes Given: 0
Re: Amstrad CPC WiFi
« Reply #627 on: 21:31, 12 August 16 »
YES! Thats it! V1.1 from CPC 6128 works!
Very Thanks!  :D

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 830
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 554
Re: Amstrad CPC WiFi
« Reply #628 on: 14:10, 13 August 16 »
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


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.
« Last Edit: 14:33, 13 August 16 by Prodatron »

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 830
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 554
Re: Amstrad CPC WiFi
« Reply #629 on: 16:25, 13 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

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.138
  • Country: dk
    • spinpoint.org
  • Liked: 1226
  • Likes Given: 918
Re: Amstrad CPC WiFi
« Reply #630 on: 17:23, 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
« Last Edit: 17:36, 13 August 16 by Duke »

Offline anyf33

  • CPC464
  • **
  • Posts: 44
  • Country: gr
  • devilmarkus come back
  • Liked: 10
  • Likes Given: 65
Re: Amstrad CPC WiFi
« Reply #631 on: 00:05, 14 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:
[youtube]v_E7iINGBFE[/youtube]

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.

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.138
  • Country: dk
    • spinpoint.org
  • Liked: 1226
  • Likes Given: 918
Re: Amstrad CPC WiFi
« Reply #632 on: 02:49, 14 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.

Offline myrsky

  • CPC464
  • **
  • Posts: 18
  • Country: fi
  • Liked: 0
  • Likes Given: 4
Re: Amstrad CPC WiFi
« Reply #633 on: 03: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 =)

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.138
  • Country: dk
    • spinpoint.org
  • Liked: 1226
  • Likes Given: 918
Re: Amstrad CPC WiFi
« Reply #634 on: 03:07, 14 August 16 »
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.


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 =)
« Last Edit: 03:09, 14 August 16 by Duke »

Offline myrsky

  • CPC464
  • **
  • Posts: 18
  • Country: fi
  • Liked: 0
  • Likes Given: 4
Re: Amstrad CPC WiFi
« Reply #635 on: 03:53, 14 August 16 »
@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.

Offline rcmolina

  • CPC464
  • **
  • Posts: 16
  • Country: es
  • Liked: 6
  • Likes Given: 8
Re: Amstrad CPC WiFi
« Reply #636 on: 10:46, 14 August 16 »
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

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.138
  • Country: dk
    • spinpoint.org
  • Liked: 1226
  • Likes Given: 918
Re: Amstrad CPC WiFi
« Reply #637 on: 18:47, 14 August 16 »
@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.

Offline MiguelSky

  • 464 Plus
  • *****
  • Posts: 362
  • Country: es
    • CPCGamesCD
  • Liked: 185
  • Likes Given: 345
Re: Amstrad CPC WiFi
« Reply #638 on: 20: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.

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.138
  • Country: dk
    • spinpoint.org
  • Liked: 1226
  • Likes Given: 918
Re: Amstrad CPC WiFi
« Reply #639 on: 20:52, 14 August 16 »
@MiguelSky: Noted, will add it next time I make an upgrade, should be very easy to add.

Offline myrsky

  • CPC464
  • **
  • Posts: 18
  • Country: fi
  • Liked: 0
  • Likes Given: 4
Re: Amstrad CPC WiFi
« Reply #640 on: 21:34, 14 August 16 »
@Duke

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

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.138
  • Country: dk
    • spinpoint.org
  • Liked: 1226
  • Likes Given: 918
Re: Amstrad CPC WiFi
« Reply #641 on: 07:30, 15 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.

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 830
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 554
Re: Amstrad CPC WiFi
« Reply #642 on: 15:53, 15 August 16 »
Later 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

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.138
  • Country: dk
    • spinpoint.org
  • Liked: 1226
  • Likes Given: 918
Re: Amstrad CPC WiFi
« Reply #643 on: 16:44, 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.

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 830
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 554
Re: Amstrad CPC WiFi
« Reply #644 on: 17:44, 15 August 16 »
Thanks, email sent!...

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline myrsky

  • CPC464
  • **
  • Posts: 18
  • Country: fi
  • Liked: 0
  • Likes Given: 4
Re: Amstrad CPC WiFi
« Reply #645 on: 00:23, 16 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.
« Last Edit: 01:30, 16 August 16 by myrsky »

Offline DaDMaN

  • CPC664
  • ***
  • Posts: 53
  • Country: es
    • LadrilloPĂ­xeles de Colores
  • Liked: 58
  • Likes Given: 30
Re: Amstrad CPC WiFi
« Reply #646 on: 12:22, 17 August 16 »
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.

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: Amstrad CPC WiFi
« Reply #647 on: 21:57, 18 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

Offline MiguelSky

  • 464 Plus
  • *****
  • Posts: 362
  • Country: es
    • CPCGamesCD
  • Liked: 185
  • Likes Given: 345
Re: Amstrad CPC WiFi
« Reply #648 on: 22:55, 18 August 16 »
Yes, I think using ESC key would be perfect too.

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.138
  • Country: dk
    • spinpoint.org
  • Liked: 1226
  • Likes Given: 918
Re: Amstrad CPC WiFi
« Reply #649 on: 19:12, 20 August 16 »

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.
« Last Edit: 19:33, 20 August 16 by Duke »