Author Topic: Amstrad CPC WiFi  (Read 222955 times)

0 Members and 4 Guests are viewing this topic.

Online Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 852
  • Country: dk
    • spinpoint.org
  • Liked: 793
Re: Amstrad CPC WiFi
« Reply #600 on: 15: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:
[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.
« Last Edit: 17:36, 07 August 16 by Duke »

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 14.361
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 2584
Re: Amstrad CPC WiFi
« Reply #601 on: 14:16, 08 August 16 »
Thanks for adding the wiki page!


It'd be good, I think, if you could also add the changelog to it. I can do it myself, of course, if you could provide me with a complete log that would save me from going through so many posts here :)

Online Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 852
  • Country: dk
    • spinpoint.org
  • Liked: 793
Re: Amstrad CPC WiFi
« Reply #602 on: 14:32, 08 August 16 »
The changelog is here (press ctrl+r, to see latest update):
http://www.spinpoint.org/cpc/m4info.txt

If you have time please add it :)  - Otherwise I will do it later(tm), I am not too familar with editing the wiki, Remax made the initial page.

Thanks for adding the wiki page!


It'd be good, I think, if you could also add the changelog to it. I can do it myself, of course, if you could provide me with a complete log that would save me from going through so many posts here :)

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 14.361
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 2584
Re: Amstrad CPC WiFi
« Reply #603 on: 15:04, 08 August 16 »
Thanks, just added up to 1.08. If you want to edit the changelog on the wiki, don't forget to use <nowiki>|</nowiki> to escape the '|' character since it's used in the markup.

Online Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 852
  • Country: dk
    • spinpoint.org
  • Liked: 793
Re: Amstrad CPC WiFi
« Reply #604 on: 15:45, 08 August 16 »
Great thanks. Will use the templete from now on.

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 388
Re: Amstrad CPC WiFi
« Reply #605 on: 01:17, 10 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

Excellent, but I assume these all stop the Z80 while receiving, sending, connecting etc which is all ok until your network gets slow.

Online Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 852
  • Country: dk
    • spinpoint.org
  • Liked: 793
Re: Amstrad CPC WiFi
« Reply #606 on: 07:29, 10 August 16 »
Excellent, but I assume these all stop the Z80 while receiving, sending, connecting etc which is all ok until your network gets slow.
Yes for each packet. Recv is only blocking when there's data in the buffer (so it'll only take the time it takes to move the data). I guess I could make send non-blocking too, ie. adding some kind of pull function to check if data was delivered.
Let's see if anyone uses them at all :)
« Last Edit: 07:44, 10 August 16 by Duke »

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 388
Re: Amstrad CPC WiFi
« Reply #607 on: 23:38, 10 August 16 »
Yes for each packet. Recv is only blocking when there's data in the buffer (so it'll only take the time it takes to move the data).

How much time does it take to move a packet? (and how big is a packet max?)

Quote
I guess I could make send non-blocking too, ie. adding some kind of pull function to check if data was delivered.

If both the send and receive functions (and connect) were non-blocking or at least always executed in less than 300us then interrupts could be enabled allowing for such things as palette/mode changes while accessing the network. That is probably not necessary for most applications, but would be nice. Failing that, having 20ms max to connect/send/receive would allow frame based interrupts to occur so we could for example play music. I know that the standard FDC doesn't allow all that anyway unless you use special small sectors, but it would be nice for networking, and you probably wouldn't want your entire CPC to stop permanently because you had a flaky telnet connection for example.
 

Online Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 852
  • Country: dk
    • spinpoint.org
  • Liked: 793
Re: Amstrad CPC WiFi
« Reply #608 on: 02:35, 11 August 16 »
How much time does it take to move a packet? (and how big is a packet max?)
Without having done actual benchmarks, max packet would be around 1500 and should take roughly 3-5 ms to move from esp to m4 with overhead af various things (z80 signaling & response handling).

If both the send and receive functions (and connect) were non-blocking or at least always executed in less than 300us then interrupts could be enabled allowing for such things as palette/mode changes while accessing the network. That is probably not necessary for most applications, but would be nice. Failing that, having 20ms max to connect/send/receive would allow frame based interrupts to occur so we could for example play music. I know that the standard FDC doesn't allow all that anyway unless you use special small sectors, but it would be nice for networking, and you probably wouldn't want your entire CPC to stop permanently because you had a flaky telnet connection for example.
Yeah I see what you are saying, I may have to refine the work flow a bit and probably make connect and send non blocking too. Thanks for the input.

Offline reidrac

  • Supporter
  • 6128 Plus
  • *
  • Posts: 565
  • Country: gb
  • Trying to gamedev!
    • index.php?action=treasury
    • usebox.net
  • Liked: 925
Re: Amstrad CPC WiFi
« Reply #609 on: 11:51, 11 August 16 »
May be a little bit off-topic, does anyone have the skills to design an enclosure for the M4?

I wouldn't mind paying for a 3D print in an online service; the M4 board is awesome and I don't like the idea of it breaking because the PCB is exposed.
Released The Return of Traxtor, Golden Tail and Magica for the CPC.

Offline SOS

  • Supporter
  • CPC6128
  • *
  • Posts: 213
  • Country: de
  • Identity lost
    • index.php?action=treasury
  • Liked: 133
Re: Amstrad CPC WiFi
« Reply #610 on: 12:06, 11 August 16 »
May be a little bit off-topic, does anyone have the skills to design an enclosure for the M4?

I wouldn't mind paying for a 3D print in an online service; the M4 board is awesome and I don't like the idea of it breaking because the PCB is exposed.
Could I extend the question?
An enclosure for the other boards are needed to  :D like F-MEM, X-MASS, MotherX4.
Personally, I would not care if the enclosure is 3D-printed or made of acrylic or other material ( as long as it would not be extremely - expensive )

Online Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 852
  • Country: dk
    • spinpoint.org
  • Liked: 793
Re: Amstrad CPC WiFi
« Reply #611 on: 12:41, 11 August 16 »
I did try to make a case in sketchup. I am however not very good with it, so I messed up some polygons and I cannot figure out to get right again.
The print does seem to be OK though. Be aware that the rather large surface does tend to warp, so print with a brim etc (I have not manged to get a perfect print!).

This version is for MX4 connector, it will need some adjustment for edge connector.

If any sketchup pro's out there, please fix my messed up polys (see red arrows).
Then I can do a Edge connector version too and a test print to make sure it fits, if anyone wants to print out their own.
Lastly the reset button wont be accessible and the leds not visible (maybe a 'tunnel' could be made to those?).

Attached is the .skp file.
« Last Edit: 12:50, 11 August 16 by Duke »

Offline myrsky

  • CPC464
  • **
  • Posts: 18
  • Country: fi
  • Liked: 0
Re: Amstrad CPC WiFi
« Reply #612 on: 02:08, 12 August 16 »
Hi everyone...

i have one of this m4 boards and looks good... but on my 464 makes nothing =(

Card is connected to the floppy disc slot with a 2gb sd formated in FAT, after turned on the 464 makes 2 resets, the rom stay the same of 464 and "cat" command gives me "press play then any key:" response.

Im lost... any ideas?

Thank you!

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.153
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1097
Re: Amstrad CPC WiFi
« Reply #613 on: 02:41, 12 August 16 »
Hi everyone...

i have one of this m4 boards and looks good... but on my 464 makes nothing =(

Card is connected to the floppy disc slot with a 2gb sd formated in FAT, after turned on the 464 makes 2 resets, the rom stay the same of 464 and "cat" command gives me "press play then any key:" response.

Im lost... any ideas?

Thank you!
What setting is the power jumper set to? And have you cleaned the edge connector recently?

Offline myrsky

  • CPC464
  • **
  • Posts: 18
  • Country: fi
  • Liked: 0
Re: Amstrad CPC WiFi
« Reply #614 on: 05:54, 12 August 16 »
Jumper is set to EXT, the card receive power, leds are turned on an reset button works... the edge conector is cleaned with isopropyl alcohol.

thx.

Online Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 852
  • Country: dk
    • spinpoint.org
  • Liked: 793
Re: Amstrad CPC WiFi
« Reply #615 on: 07:24, 12 August 16 »
Have you upgraded the firmware to latest version?
The first version did not work with Gate Array 40007, I think.

Jumper is set to EXT, the card receive power, leds are turned on an reset button works... the edge conector is cleaned with isopropyl alcohol.

thx.

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.931
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 775
Re: Amstrad CPC WiFi
« Reply #616 on: 11:00, 12 August 16 »
Also, silly as it sounds, clean thoroughly the edge connector with isopropyl alcohol to make sure you don't have a bad contact.

Offline elanstra

  • CPC464
  • **
  • Posts: 10
  • Country: de
  • Liked: 2
Re: Amstrad CPC WiFi
« Reply #617 on: 11:12, 12 August 16 »
Do as robcfg suggested. Sounds like the Amstrad's edge connector is dirty. I had the same issue with both my old CPC 6128. I cleaned it first with a cotton bud wet with lighter fluid. After letting it dry, I also used a soft eraser. After that, it worked like a charm.

Offline DerSchatten

  • CPC464
  • **
  • Posts: 38
  • Country: 00
  • Liked: 2
Re: Amstrad CPC WiFi
« Reply #618 on: 19:27, 12 August 16 »
Please help...

What is the correct ROM Configuration to start BASIC V1.1 on a CPC464.
My XMEM is configured according Attachment and it works fine when i Change the ROM boot/noboot-Switch.

for m4 board I have tried the following Setting:

Rom slot 0 ... BASIC V1.1 (CPC664)
Rom slot 31 ... Lower ROM FW316UK32

Romboard start 0
Lower-rom Enabled YES
Lower-rom Slot 31

The CPC starts with FW 3.16-EN
BASIC 1.1
READY

But no Cursor.

perhaps missing the FW316EXP.ROM ?
On the XMEM, it is on Slot 01.

Online Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 852
  • Country: dk
    • spinpoint.org
  • Liked: 793
Re: Amstrad CPC WiFi
« Reply #619 on: 19:39, 12 August 16 »
Show picture of M4 rom setting  :) - It sounds right though, do you have XMEM connected at the same time without disabling its romboard?

Please help...

What is the correct ROM Configuration to start BASIC V1.1 on a CPC464.
My XMEM is configured according Attachment and it works fine when i Change the ROM boot/noboot-Switch.

for m4 board I have tried the following Setting:

Rom slot 0 ... BASIC V1.1 (CPC664)
Rom slot 31 ... Lower ROM FW316UK32

Romboard start 0
Lower-rom Enabled YES
Lower-rom Slot 31

The CPC starts with FW 3.16-EN
BASIC 1.1
READY

But no Cursor.

perhaps missing the FW316EXP.ROM ?
On the XMEM, it is on Slot 01.

Offline DerSchatten

  • CPC464
  • **
  • Posts: 38
  • Country: 00
  • Liked: 2
Re: Amstrad CPC WiFi
« Reply #620 on: 19:55, 12 August 16 »
XMEM is connected with the same connector at the same time, yes, but disabled with the "READ ROM NO/YES Jumper"

WEB and ROMAN with the same configuration in attach.

Romboard start is 0, not 1

Offline myrsky

  • CPC464
  • **
  • Posts: 18
  • Country: fi
  • Liked: 0
Re: Amstrad CPC WiFi
« Reply #621 on: 20:02, 12 August 16 »
@robcfg and elantra

thank you ill try to clean it deeper

@duke

I dont know my gatearray version and dont know what fw i have, any tutorial for update the M4?

Thanks.

Online Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 852
  • Country: dk
    • spinpoint.org
  • Liked: 793
Re: Amstrad CPC WiFi
« Reply #622 on: 20:06, 12 August 16 »
@robcfg and elantra

thank you ill try to clean it deeper

@duke

I dont know my gatearray version and dont know what fw i have, any tutorial for update the M4?

Thanks.
Yeah clean the connector an extra time, even if you think it's clean.
Look under firmware here:
M4 Board - CPCWiki

Simply download v1.0.8 and unpack it to the root of your microSD card from the PC, insert to M4 and power up the CPC.

Online Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 852
  • Country: dk
    • spinpoint.org
  • Liked: 793
Re: Amstrad CPC WiFi
« Reply #623 on: 20:27, 12 August 16 »
XMEM is connected with the same connector at the same time, yes, but disabled with the "READ ROM NO/YES Jumper"

WEB and ROMAN with the same configuration in attach.

Romboard start is 0, not 1

Ok, if start is 0 it should work, just in case try removing the XMEM. And I don't know ROMAN, but it probably wont do any good for M4 board (dont know if will do any harm either...).

Offline DerSchatten

  • CPC464
  • **
  • Posts: 38
  • Country: 00
  • Liked: 2
Re: Amstrad CPC WiFi
« Reply #624 on: 20: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.
« Last Edit: 21:05, 12 August 16 by DerSchatten »