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

Grim

+1

Also:

  • What's up with this double CPC reset? (As seen in the YT video) Is it temporary or does the final board will do that as-well?
  • Could it be possible to configure the integrated ROM-board to use a different mapping range (eg. slots 32-47, 48-63 or whatever, instead of 0-15) in order to play nice with existing ROM-Boards? (esp. the X-MEM)

pelrun

Quote from: Executioner on 00:21, 10 May 16
What is the 32k RTC? Does it have 32K of static memory attached?


32k as in 32767Hz crystal clock.

Duke

Quote from: Grim on 04:05, 10 May 16
+1

Also:

       
  • What's up with this double CPC reset? (As seen in the YT video) Is it temporary or does the final board will do that as-well?
  • Could it be possible to configure the integrated ROM-board to use a different mapping range (eg. slots 32-47, 48-63 or whatever, instead of 0-15) in order to play nice with existing ROM-Boards? (esp. the X-MEM)
The double reset is because when the board is powered (by the cpc), the cortex needs a little bootup time, to read config from microSD, init the ESP8266 etc.

Its possible to move the range of the slots, however for first version I just want the basics to work. I have no idea if it will be possible to run it along with other expansions, I do tap into every signal of exp. port, except LPEN and sound AFAIR. and there is also the power consumption issue.

Duke

Quote from: Executioner on 00:21, 10 May 16
What is the 32k RTC? Does it have 32K of static memory attached?

As pelrun said its the 32768 Hz clock for the internal RTC in the Cortex MCU, reason I may not attach this nor the battery backup, is that with internet it could just do ntp time lookup and retrieve the clock from there. I haven't looked into this yet, but I think it should be easy enough.

Kris

Would be interested in one as well :)


skywalky

+1 for me please  :D

khaz

#56
for fun: screenshot of Lynx in 40*25 showing cpcwiki.eu

[attachimg=1]

for real, I'd be happy with a simple wget implementation. Like this

[attach=3]

Duke

#57
Yes it should be possible with a textbased browser :)   - Perhaps not https though.

Right now I am having a problem when testing on CPC6128 PLUS, appearently I cannot put my rom as number 7, replacing AMSDOS.
I am pulling ROMDIS high when sending the rom data and as far as I can understand from:
Arnold V specs - CPCWiki

ROMDIS should still work.

Anyone here with a CPC6128 PLUS and a romboard, that can confirm its possible to replace AMSDOS ?


Nevermind tested with parados_1.2+, and that worked, so its something else then :)

EDIT: Ok, wasn't aware that it had the selection screen init jp vector at 0xC072. Works now.

Rennert

I would buy one board ;)
...KC Compact

||C|-|E||

It would be ridiculously great to have a cool IRC client for the Amstrad that works straight from BASIC  :D

Prodatron

Great news!

I am interested in 2 boards as well!

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Prodatron

@Duke: Just two questions regarding driver development on CPC side:
- is it possible to low level access the SD card (reading and writing sectors directlly)?
- is it possible to access the ESP8266 in a way, that the CPC can send and receive TCP and UDP packages (multiple sockets/connections)? Are there any buffers for incoming and outgoing data on hardware side?

CU,
Prodatron

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Duke

For both your questions it's possible yes, as it just about adding more ipc commands from the cpc to the m4 and the m4 to the esp.
But neither is possible yet. To be honest the source  is a big mess at the moment :) for initial release I just want the basic operations to work relieable and on all cpc's.
Maybe I'll release the source at some point or if I fell like it improve and add features myself.
As for buffers, the cpc receive buffer is in the M4 ROM area, the send buffer has to be in RAM.

This is a flow of a simple command from CPC (|netstat no params) to display current status of the WiFi connection.
//////////////////
// On the cpc side


rom_reponse            .equ    0xD000
C_NETSTAT                .equ    0x4323
; ------------------------- get network status
netstat:
        call    get_iy_workspace
        ld    (iy),#2
        ld    1(iy),#C_NETSTAT
        ld    2(iy),#C_NETSTAT>>8
        push    iy
        pop    hl
        call    send_command
       
        ld    hl,#rom_reponse+3
        call    show_message
        ret
       
; HL contains packet to be send
send_command:
        ld    bc,#0xFE00            ; data out port
        ld    d,(hl)                ; size
        out    (c),d
sendloop:   
        inc    hl
        ld    a,(hl)
        out    (c),a
        dec    d
        ld    a,d
        cp    #0
        jr nz, sendloop
       
        ; tell M4 that command has been send
        ld    bc,#0xFF00
        out (c),c
        ret       
///////////////////
// On the Cortex M4
case C_NETSTAT:
        netstat_send_esp(&rcv->data[0]);
        switch ( rcv->data[0] )
        {
            case 0:
            rsp->size = 3+sprintf(&rsp->data[0], "Idle.\r\n");
            break;
           
            case 1:
            rsp->size = 3+sprintf(&rsp->data[0], "Connecting.\r\n");
            break;
           
        .... etc
//////////////////////
// on the ESP8266
void m4_ipc_handler(void)
{
    volatile unsigned int cmdid;
    volatile unsigned int cmdsize;
   
    if ( spiWrite(0) == 0x55 )    // initiate transfer?
    {
        spiRead(&cmdid, 4);
        spiRead(&cmdsize, 4);
       
        spiRead(&m4data, cmdsize);
  ...etc

responds with:

void netstat(void)
{
    m4data[0] = wifi_station_get_connect_status();
    if ( m4data[0] == 5 )    // Got IP
    {
        wifi_get_ip_info(0, &netConfig.ip);
        os_memcpy(&m4data[1], &netConfig.ip, 4);
    }
    spiCommandNoResp(M4CMD_NETSTAT, 5, m4data);
   
}

So it's quite a pipeline, maybe it can be simplefied somewhat, but basically all commands can be added with enough effort :)

I also have a config area in the rom, where I from the cpc can ask the cortex m4 to write to this area, so this could be used as an outgoing buffer.

Hope it makes sense.

Quote from: Prodatron on 17:04, 10 May 16
@Duke: Just two questions regarding driver development on CPC side:
- is it possible to low level access the SD card (reading and writing sectors directlly)?
- is it possible to access the ESP8266 in a way, that the CPC can send and receive TCP and UDP packages (multiple sockets/connections)? Are there any buffers for incoming and outgoing data on hardware side?

CU,
Prodatron

Grim

Two quick remarks. In your sendloop code, you can safely remove the ld a,d:cp #0 and you might want to check the outi instruction too. Also, the I/O address #FFxx is already used by the CPC-Booster but this shouldn't be much of a problem imo, since your WiFi card will most likely supersede it anyway :)

If several revisions of the M4 firmware are made, is there any way the CPC can detect which version is currently available? (eg. to avoid invoking unavailable commands). Oh, and Hurray! for open-sourcing everything too! (yes, you will open-source everything [calm voice and Jedi hand trick]).

dxs

Sounds like a great board.
I'm also in for one!

Duke

Quote from: Grim on 20:28, 10 May 16
Two quick remarks. In your sendloop code, you can safely remove the ld a,d:cp #0 and you might want to check the outi instruction too. Also, the I/O address #FFxx is already used by the CPC-Booster but this shouldn't be much of a problem imo, since your WiFi card will most likely supersede it anyway :)

If several revisions of the M4 firmware are made, is there any way the CPC can detect which version is currently available? (eg. to avoid invoking unavailable commands). Oh, and Hurray! for open-sourcing everything too! (yes, you will open-source everything [calm voice and Jedi hand trick]).
Thanks - My z80 skills are rusty, not having used it since 1991 :) - For the ports, they may not be final choice yet.
It's a good idea to include a version command from the first release atleast and maybe checkupgrade. And I will make no promise about opensourcing it yet 8)

mr_lou

Ever since I saw the SD2IEC device for the C64, I've longed for something similar for the CPC.
But every time someone asked about such a device on this forum, the replies were mostly that it couldn't be done.
So in the end I reluctantly settled for HxC devices.

I'd love to have one of these devices plugged into my CPC464 the same way a DDI adapter is connected. I..e. in a box and hanging on the back of the CPC, rather than lying on the table behind the CPC.
If there'll be versions of this device like that, then I'd like one too. But I understand such a version is probably not top priority.

Duke

@mr_lou
I have ordered some right angle pcb edge connectors. I'll have to see them before I am sure if they can be used for the cpc.
The idea was to make a mini pcb (ie. expansion port length x 2 cm) with edge connector for the cpc expansion port in one side and a idc connector in the other side, this could then be either right angle to lay flat with the table or non angled, so it will standup like ie. ddi interface.
This way users can have their own choice, use motherX4 or cable or use the edge connector to idc connector pcb if they have non centronics cpc.
Lets see how it goes.
About the HxC, this device cannot replace it, as it cannot act as FDC controller, so all games that use custom disc loading (most copy protected discs) talking directly to the FDC will not work. A proper cracked version is needed if it can be found and I have tested quite a few cracks that still have direct FDC loading code.

Dubliner

I hope i am not too late, but i would love one of these as well. So count me in :)

mr_lou

Quote from: Duke on 09:18, 11 May 16
@mr_lou
I have ordered some right angle pcb edge connectors. I'll have to see them before I am sure if they can be used for the cpc.
The idea was to make a mini pcb (ie. expansion port length x 2 cm) with edge connector for the cpc expansion port in one side and a idc connector in the other side, this could then be either right angle to lay flat with the table or non angled, so it will standup like ie. ddi interface.
This way users can have their own choice, use motherX4 or cable or use the edge connector to idc connector pcb if they have non centronics cpc.
Lets see how it goes.
About the HxC, this device cannot replace it, as it cannot act as FDC controller, so all games that use custom disc loading (most copy protected discs) talking directly to the FDC will not work. A proper cracked version is needed if it can be found and I have tested quite a few cracks that still have direct FDC loading code.

That is awesome Duke!

Please add me to the waiting list of buyers.  :)

tonio8bits

Hello,

Very interesting board. Would like to have one also.

can you add me to the list please.

Tonio8bits :D

Duke

Quote from: Dubliner on 09:37, 11 May 16
I hope i am not too late, but i would love one of these as well. So count me in :)

You are not too late, but be prepared it may be a long process, I don't know how long it will take to assemble all these boards... I am the pick and place machine and manually soldering connectors, correcting shorts on the chips etc. And parts are still many weeks away.
Anyway when I am a little further with things I'll update on the process.

Kris

Quote from: Duke on 12:24, 11 May 16
You are not too late, but be prepared it may be a long process, I don't know how long it will take to assemble all these boards... I am the pick and place machine and manually soldering connectors, correcting shorts on the chips etc. And parts are still many weeks away.
Anyway when I am a little further with things I'll update on the process.


If possible then propose you card as "DIY kit"; some of us are able to assemble & sold all the component ;)


Dubliner

Quote from: Duke on 12:24, 11 May 16
You are not too late, but be prepared it may be a long process, I don't know how long it will take to assemble all these boards...

As long as it needs. I am in no hurry at all :)

Phantomz

@Duke Great little board you've got there.  8)

I'd be interested in one, if they become available later.  :)

Powered by SMFPacks Menu Editor Mod