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 11 Guests are viewing this topic.

Duke

#600

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.

Gryzor

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 :)

Duke

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.

Quote from: Gryzor on 12: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 :)

Gryzor

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.

Duke

Great thanks. Will use the templete from now on.

Executioner

Quote from: Duke on 13:53, 07 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.

Duke

#606
Quote from: Executioner on 23:17, 09 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 :)

Executioner

Quote from: Duke on 05:29, 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.

Duke

Quote from: Executioner on 21:38, 10 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).

Quote from: Executioner on 21:38, 10 August 16
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.

reidrac

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, Magica, The Dawn of Kernel, Kitsune`s Curse, Brick Rick and Hyperdrive for the CPC.

If you like my games and want to show some appreciation, you can always buy me a coffee.

SOS

Quote from: reidrac on 09: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.
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 )

Duke

#611
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.

myrsky

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!

CraigsBar

Quote from: myrsky on 00: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!
What setting is the power jumper set to? And have you cleaned the edge connector recently?
IRC:  #Retro4All on Freenode

myrsky

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.

Duke

Have you upgraded the firmware to latest version?
The first version did not work with Gate Array 40007, I think.

Quote from: myrsky on 03: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.

robcfg

Also, silly as it sounds, clean thoroughly the edge connector with isopropyl alcohol to make sure you don't have a bad contact.

elanstra

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.

DerSchatten

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.

Duke

Show picture of M4 rom setting  :) - It sounds right though, do you have XMEM connected at the same time without disabling its romboard?

Quote from: DerSchatten on 17: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.

DerSchatten

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

myrsky

@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.

Duke

Quote from: myrsky on 18: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.
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.

Duke

Quote from: DerSchatten on 17: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

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...).

DerSchatten

#624
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.

Powered by SMFPacks Menu Editor Mod