Author Topic: Amstrad CPC WiFi  (Read 330658 times)

0 Members and 2 Guests are viewing this topic.

Offline Grim

  • CPC6128
  • ****
  • Posts: 202
  • Country: gp
  • La pak ba, bèf ka pasé
    • THERE IS NO GAME
  • Liked: 133
  • Likes Given: 67
Re: Amstrad CPC WiFi
« Reply #50 on: 06: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)

Offline pelrun

  • Supporter
  • 6128 Plus
  • *
  • Posts: 580
  • Country: au
    • index.php?action=treasury
  • Liked: 296
  • Likes Given: 167
Re: Amstrad CPC WiFi
« Reply #51 on: 06:18, 10 May 16 »
What is the 32k RTC? Does it have 32K of static memory attached?


32k as in 32767Hz crystal clock.

Online Duke

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

Online Duke

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

Offline Kris

  • 6128 Plus
  • ******
  • Posts: 554
  • Country: fr
  • Team Impact
  • Liked: 220
  • Likes Given: 819
Re: Amstrad CPC WiFi
« Reply #54 on: 10:28, 10 May 16 »
Would be interested in one as well :)


Offline skywalky

  • CPC664
  • ***
  • Posts: 62
  • Country: es
  • Liked: 17
  • Likes Given: 43
Re: Amstrad CPC WiFi
« Reply #55 on: 11:53, 10 May 16 »
+1 for me please  :D

Offline khaz

  • 464 Plus
  • *****
  • Posts: 490
  • Country: fr
  • Liked: 251
  • Likes Given: 68
Re: Amstrad CPC WiFi
« Reply #56 on: 12:16, 10 May 16 »
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

 [ Invalid Attachment ]
« Last Edit: 12:48, 10 May 16 by khaz »

Online Duke

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

Offline Rennert

  • CPC464
  • **
  • Posts: 33
  • Country: 00
  • KC Compact
  • Liked: 14
  • Likes Given: 2
Re: Amstrad CPC WiFi
« Reply #58 on: 18:30, 10 May 16 »
I would buy one board ;)
...KC Compact

Offline ||C|-|E||

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 1.817
  • Country: gb
    • index.php?action=treasury
    • Mundo CPC
  • Liked: 1017
  • Likes Given: 1074
Re: Amstrad CPC WiFi
« Reply #59 on: 18:36, 10 May 16 »
It would be ridiculously great to have a cool IRC client for the Amstrad that works straight from BASIC  :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 #60 on: 18:44, 10 May 16 »
Great news!

I am interested in 2 boards as well!

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 #61 on: 19: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

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Online Duke

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

@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

Offline Grim

  • CPC6128
  • ****
  • Posts: 202
  • Country: gp
  • La pak ba, bèf ka pasé
    • THERE IS NO GAME
  • Liked: 133
  • Likes Given: 67
Re: Amstrad CPC WiFi
« Reply #63 on: 22: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]).

Offline dxs

  • CPC664
  • ***
  • Posts: 116
  • Country: fr
  • Liked: 111
  • Likes Given: 19
Re: Amstrad CPC WiFi
« Reply #64 on: 00:38, 11 May 16 »
Sounds like a great board.
I'm also in for one!

Online Duke

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

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.921
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1091
  • Likes Given: 2305
Re: Amstrad CPC WiFi
« Reply #66 on: 08:06, 11 May 16 »
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.

Online Duke

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

Offline Dubliner

  • CPC664
  • ***
  • Posts: 76
  • Country: es
  • Liked: 92
  • Likes Given: 4
Re: Amstrad CPC WiFi
« Reply #68 on: 11:37, 11 May 16 »
I hope i am not too late, but i would love one of these as well. So count me in :)

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.921
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1091
  • Likes Given: 2305
Re: Amstrad CPC WiFi
« Reply #69 on: 11:48, 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.  :)

Offline tonio8bits

  • CPC464
  • **
  • Posts: 5
  • Country: fr
  • Liked: 0
  • Likes Given: 0
Re: Amstrad CPC WiFi
« Reply #70 on: 14:03, 11 May 16 »
Hello,

Very interesting board. Would like to have one also.

can you add me to the list please.

Tonio8bits :D

Online Duke

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

Offline Kris

  • 6128 Plus
  • ******
  • Posts: 554
  • Country: fr
  • Team Impact
  • Liked: 220
  • Likes Given: 819
Re: Amstrad CPC WiFi
« Reply #72 on: 14:29, 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 ;)


Offline Dubliner

  • CPC664
  • ***
  • Posts: 76
  • Country: es
  • Liked: 92
  • Likes Given: 4
Re: Amstrad CPC WiFi
« Reply #73 on: 15:44, 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 :)

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.141
  • Country: gb
  • Liked: 1659
  • Likes Given: 534
Re: Amstrad CPC WiFi
« Reply #74 on: 16:00, 11 May 16 »
@Duke Great little board you've got there.  8)

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