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 1 Guest are viewing this topic.

Duke

Quote from: KaosOverride on 08:22, 28 August 16
Got the cards!! When I have some free time I will test them. Is there any roadmap for UDP?


My idea is to make some kind of BSD sockets lib for SDCC (CPCtelera, etc) because I have a port in mind. But I need UDP. No hurry!!!

Good. Not yet, once TCP implementation is confirmed OK, I can add UDP and hopefully later host functions.

Prodatron

#676
Finished the driver and need to do a lot of tests now.
[attachimg=1]
Thanks so much to Duke for this very generic network API and your fast replys and useful modifications! Unfortunately I am not home during the next days, but hopefully there is more progress on the XzentriX 8bit retro meeting next weekend! :)

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

myrsky

Hi

I have access to a wifi network so i trying to configure the M4 for FW316ES and CPC6128 basic 1.1 through the web interface but the RSX commands to setup the wifi network doesnt work with basic 1.0. What can i do?

I was using a program called ROMAN to manage rom slots but on a CPC464 cant import any file... so no more ideas.

Duke

#678
Quote from: myrsky on 02:35, 29 August 16
Hi

I have access to a wifi network so i trying to configure the M4 for FW316ES and CPC6128 basic 1.1 through the web interface but the RSX commands to setup the wifi network doesnt work with basic 1.0. What can i do?

I was using a program called ROMAN to manage rom slots but on a CPC464 cant import any file... so no more ideas.
You can use all the M4 RSX commands on a CPC464 with basic 1.0, instead of passing arguments directly you need to use a variable.
Ie. for setting up the network:
A$="name=CPC464, ssid=NETGEAR, pw=12345678, dhcp=1, dns1=8.8.8.8, dns2=8.8.4.4"

|NETSET,@A$

(edit the ssid and pw to match your router or access point).

Afterwards check the netconnection using:
|NETSTAT

As for managing roms from the CPC itself, you need to use |ROMUP, |ROMSET & |ROMUPD (refer to manual: http://www.spinpoint.org/cpc/m4info.txt).
Unfortunately you need the webinterface to set up the lowerrom.

@Prodatron: Great work! - Hope there isn't too many bugs in my API, we shall see :)

Edoz(MSX)

Quote from: Prodatron on 00:40, 29 August 16
Finished the driver and need to do a lot of tests now.
[attachimg=1]
Thanks so much to Duke for this very generic network API and your fast replys and useful modifications! Unfortunately I am not home during the next days, but hopefully there is more progress on the XzentriX 8bit retro meeting next weekend! :)

Wow! What impressive is this!! I don't own a CPC computer but i really like to see this screenshot!!! :D :D

Prodatron

Quote from: KaosOverride on 08:22, 28 August 16My idea is to make some kind of BSD sockets lib for SDCC (CPCtelera, etc) because I have a port in mind.
The multiplayer tank network game for the SpectraNet??  :P
I am currently using UDP only for DHCP and DNS lookup, and as this is done by the M4 anyway I am currently not missing it, but I can imagine that it is useful for future projects as well. Hope to finish the TCP function tests this weekend.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

CraigsBar

#681
Quote from: Prodatron on 13:14, 29 August 16
The multiplayer tank network game for the SpectraNet??  [emoji14]
I am currently using UDP only for DHCP and DNS lookup, and as this is done by the M4 anyway I am currently not missing it, but I can imagine that it is useful for future projects as well. Hope to finish the TCP function tests this weekend.
:) just a thought I had last night.... Does the raw version of symbos also boot on a xmass? Sorry for going off topic here.

Back on topic again, with symbos booting so quickly from the m4 SD card are there any advantages to the ROM version any more? Once this network and m4 storage version is release I think we will have a new king for symbos hardware. So long symbiface2, your time has gone!
IRC:  #Retro4All on Freenode

Joseman

Quote from: CraigsBar on 14:47, 29 August 16
So long symbiface2, your time has gone!

M4 lacks ps/2 mouse port!!

CraigsBar

The albireo has a USB socket with HID support. I still hope to see Symbos support for that ;)
IRC:  #Retro4All on Freenode

myrsky

Quote from: Duke on 05:57, 29 August 16
You can use all the M4 RSX commands on a CPC464 with basic 1.0, instead of passing arguments directly you need to use a variable.
Ie. for setting up the network:
A$="name=CPC464, ssid=NETGEAR, pw=12345678, dhcp=1, dns1=8.8.8.8, dns2=8.8.4.4"

|NETSET,@A$

(edit the ssid and pw to match your router or access point).

Afterwards check the netconnection using:
|NETSTAT

As for managing roms from the CPC itself, you need to use |ROMUP, |ROMSET & |ROMUPD (refer to manual: http://www.spinpoint.org/cpc/m4info.txt).
Unfortunately you need the webinterface to set up the lowerrom.

@Prodatron: Great work! - Hope there isn't too many bugs in my API, we shall see :)

Sorry i was aware of a$ but not for all commands... this makes things easier, im a fucking nerd with CPC interfaces.

Thanks Duke.

TFM

Quote from: Octoate on 09:41, 27 August 16
And another question... working in a network with more than 400 people, some people think that it is funny to reset the CPC during playing or working with it ...


That is a good point. I know that the M4 needs to reset the CPC at startup, but in general it should not be able to reset the CPC for any other software or especially somebody from a network.


(Forget passwords, people love to hack em).
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Edoz(MSX)

#686
Quote from: CraigsBar on 14:47, 29 August 16
:) just a thought I had last night.... Does the raw version of symbos also boot on a xmass? Sorry for going off topic here.

Back on topic again, with symbos booting so quickly from the m4 SD card are there any advantages to the ROM version any more? Once this network and m4 storage version is release I think we will have a new king for symbos hardware. So long symbiface2, your time has gone!

This is how the MSX works. You boot SymbOS from a storage device. As the MSX have a lot of different storage devices you have to load the storage drivers first before loading SymbOS. Anyway I love this new Wifi interface! Is the device I/O based? And in that case the hardware could be compatible for the MSX as well ;)

myrsky

#687
@Duke

More news about my adventures with M4, after a correct wireless setup i put (using the web interface) BASIC 1.1 from 6128 on slot 1 and fw316es32 on slot 31 as you suggested to the user dershatten in the attached picture... the files used are the following, FW316 from here GitHub - realmml/FW3.1x: A series of patches over the original Amstrad CPC and cpc6128 basic 1.1 from here Locomotive BASIC - CPCWiki

My result is a garbage boot screen or a infinite reset loop.

Duke

#688
Quote from: Edoz(MSX) on 20:59, 29 August 16
Is the device I/O based? And in that case the hardware could be compatible for the MSX as well ;)
Partially, commands are send via ports, but responses are put into a memory mapped rom area (M4 ram).

@myrsky : Try attaching a zipped version of your romslots.bin & romconfig.bin. However the version I attached earlier should have worked just fine (it did on my 464).
Just noticed you say inifinite reset loop, perhaps try to clean connector again.
Also another suggestion, try to use lowerrom from CPC664 and upperrom from CPC664 to see if that works. (OS.rom is lower, Basic.rom is upper)

Duke

Another little v1.0.9 beta : http://www.spinpoint.org/cpc/M4FIRM_v109b6.zip

Besides some small changes to netapi (will document later...)
Added one super cool feature - I think atleast 8)
Upon bootup / reset, it will now look for AUTOEXEC.BAS in root directory and if found, launch it first thing.

Example AUTOEXEC.BAS, to set your own custom colours

10 INK 0,0
20 INK 1,26
30 BORDER 0
save"autoexec.bas"

Please test and let me know if any issues or undesired sideffects (it's a bit of a wacky hack...)

CraigsBar

Quote from: Duke on 08:33, 30 August 16
Another little v1.0.9 beta : http://www.spinpoint.org/cpc/M4FIRM_v109b6.zip

Besides some small changes to netapi (will document later...)
Added one super cool feature - I think atleast 8)
Upon bootup / reset, it will now look for AUTOEXEC.BAS in root directory and if found, launch it first thing.

Example AUTOEXEC.BAS, to set your own custom colours

10 INK 0,0
20 INK 1,26
30 BORDER 0
save"autoexec.bas"

Please test and let me know if any issues or undesired sideffects (it's a bit of a wacky hack...)
I am so definitely gonna be playing with this tonight.

IRC:  #Retro4All on Freenode

CraigsBar

Quote from: CraigsBar on 09:38, 30 August 16
I am so definitely gonna be playing with this tonight.

@Duke, this a f'king amazing.

I have placed the SymbOS roms in slots 15, 29, 30 & 31

I used the 6 lines of basic below and it presents a 5 second dialog to not boot Symbos and if the prompt is not actioned it boots symbos from Rom! I love it.

  10 AFTER 250 GOSUB 50
  20 LOCATE 1,7: PRINT "Press [CONTROL] to cancel SymbOS Boot"
  30 IF INKEY (23) <> 128 THEN 30
  40 sym$="N": GOTO 50
  50 IF sym$="N" THEN GOTO 60 ELSE MODE 1:|SYM   
  60 LOCATE 1,7: PRINT"                                           ":LOCATE 1,7:END

bravo duke, this is great.  ;D
IRC:  #Retro4All on Freenode

myrsky

Quote from: Duke on 05:08, 30 August 16
Partially, commands are send via ports, but responses are put into a memory mapped rom area (M4 ram).

@myrsky : Try attaching a zipped version of your romslots.bin & romconfig.bin. However the version I attached earlier should have worked just fine (it did on my 464).
Just noticed you say inifinite reset loop, perhaps try to clean connector again.
Also another suggestion, try to use lowerrom from CPC664 and upperrom from CPC664 to see if that works. (OS.rom is lower, Basic.rom is upper)

Booting from scratch 464 never made automatic reboots, these screen garbage and reboots come after wireless config. This is the last config i did...

PS: When i make wifi transfers to the 464, i hear interference in the internal speaker, thats only like curiosity nothing important.

Duke

Quote from: myrsky on 20:52, 30 August 16
Booting from scratch 464 never made automatic reboots, these screen garbage and reboots come after wireless config. This is the last config i did...

PS: When i make wifi transfers to the 464, i hear interference in the internal speaker, thats only like curiosity nothing important.
What powersupply are you using? - Perhaps you should try to add a USB power supply directly to the M4 board and change jumper then interference will go away.
I only had "automatic" reboots when edge connector needed cleaning, but could be a power draw in your case if its only with wifi enabled... You could try to delete or rename the config.txt in m4 folder and reboot again without WiFi enabled to see if it changes anything.

myrsky

@Duke

I use a 5V 2A powersupply but with your M4 config on page 65 of this thread is not stable with same "automatic" reboots with WiFi disabled.

zhulien

Hi Duke. I am wondering with the web interface... where is it served from? Could a wwwroot be served from a wwwroot folder on the sdcard if one exists?

KaosOverride

Quote from: Prodatron on 13:14, 29 August 16
The multiplayer tank network game for the SpectraNet??  :P



Yes!! Until UDP I will focus in the graphics engine. I have to port the full project from Z88dk to SDCC, from the Z88dk's SP1 tile and sprite lib maybe making a kind of wrapper to the cpctlera functions, and many more. I have to make a CPC.h to replace Spectrum.h, and the BSDsockets lib to make the fewer changes to the original game.  :-X So there is not hurry for the UDP.


The tank server/engine is impresive. with few changes we can make some kind of CallOfDuty 2D deathmatch. With more straight maps and changing from rotational control to directional, the sprites for human soldiers, not tanks, reciclyng the fuel icon with grenades....


The client is just a loop that sends movement commands from keypress and draws sprites and sets the tilemap from UDP messages. Messages of create/destroy or relocation of the sprites, scoreboard, and the map tile section every time you change of map sector. Is just a player!!! all the IA is managed at the server...


And with a good hardware abstraction socket lib, if there is more hardware (ethernet, other wifis) the game just needs to change the lib and work with new hardware.
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Duke

Quote from: zhulien on 22:38, 30 August 16
Hi Duke. I am wondering with the web interface... where is it served from? Could a wwwroot be served from a wwwroot folder on the sdcard if one exists?
It's served from the flash on the ESP module, but you should be able to just place files on sd card and write http://name/sd/ (or ip) then it will read from root of sd card, just prefix all links with /sd.

KaosOverride

If http://host/ reads from sd/wwwroot and http://host/setup opens de setup panels then you have the CPC web server done xD


If the /sd full access is configured as an option to deny http://host/sd and a file at m4/setup.txt for basic auth, then you are done.


Will be funny to edit html with tasword at wwwroot and serve it to the world... LOL
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Prodatron

Quote from: KaosOverride on 10:05, 31 August 16
If http://host/ reads from sd/wwwroot and http://host/setup opens de setup panels then you have the CPC web server done xD


If the /sd full access is configured as an option to deny http://host/sd and a file at m4/setup.txt for basic auth, then you are done.


Will be funny to edit html with tasword at wwwroot and serve it to the world... LOL

In this case it's more an M4 Cortex webserver than a CPC web server ;)
Interesting topic anyway. If Duke will add server/passive TCP mode in the future it has to be changed, as the CPC itself may want to listen at port 80.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Powered by SMFPacks Menu Editor Mod