M4 Board – Retrofun, 8-Bit Amstrad CPC WiFi

Description and purpose of the “M4 board”.
The M4 board, features as previously described a ST32F407 Cortex M4 MCU, connected via SPI to a ESP8266 WIFI module, and 18 GPIO’s routed via a GTL2000 voltage translator chip.

It was meant to be connected to the old the Amstrad CPC (z80 based) computer via it’s expansion port.
As with most old age computers, it runs with 5V I/O, here is where the GTL2000 chip came in handy.
The signals driven through the GTL2000 are output signals and the bi-directional data bus (D0-D7).

Input signals are connected directly to the ST32F407 Cortex M4 as it is 5V tolerant.

The idea was to provide WiFi to the Amstrad CPC, for easy and fast data exchange between it and a PC, but also direct internet access.

ROM BOARD emulation
First prerequisite was the ability to run code on the Amstrad via the M4 MCU so no additional loading (i.e. disc) would be needed.
It would be done by mapping a ROM in the Amstrad addressable space, this ROM would be in the M4 ram.

IORQ and WR will occur when a ROM is selected, data lines will contain the ROM number.
ROMEN and RD will occur when a read is happening from the currently selected ROM, address lines have the address, ROM data will be send back over the data lines.
A fairly trivial task, but the timing is tight having to bit bang the gpio, do direction changes on gpio’s mapped as data lines, even when the bus runs at only 4MHz.
Much time spent optimizing the handler in ARM assembler, it finally worked.

SD card storage
Being able to run code via the ROM board emulation, it would be nice to have native r/w storage.
A micro SD card slot connected to the M4 SDIO lines, was meant for this purpose.
An transfer interface from the Amstrad CPC to the M4 was designed.
Two I/O ports were assigned when an IORQ happened, one for receiving data on the M4 and one for telling it data was send, so it could process.
This was done as it’s easy to store data (low clock count), but takes additional time to process them.
When the 2nd port is written, the MCU sends BUSRQ signal to the Z80 CPU, which will ‘freeze’ the z80 CPU at the end of the current cycle, now the M4 has the time it needs to process the incoming data, before resuming the Z80 CPU and responding.
Responses are done in the ROM space, which of course is read only on the CPC, but R/W on the M4, as it is kept in the M4 ram!
Next up, was to hook the system bios/firmware functions, that do file related I/O to tape and disc on the original system and re-directing them to the sdcard.
Thus native file access from the SD card is possible, providing the CPC with up to 32GB (or more) of storage via SD card.

WiFi & Internet
In short the connection between ESP8266 and the M4 was done via SPI as IPC.
To allow internet/WiFi access from the Amstrad CPC itself, it sends a command to the M4, which again sends an IPC call to the ESP.

WEB interface
The ESP8266 hosts a WEB server, where various settings can be altered.
web_interface1 web_interface2

A battery mount was put on the board, making it possible to provide Real time clock as well via the RTC in the ST32F407.

What it does
Emulate Romboard, currently up to 16 roms, can be uploaded/removed via Web Interface.
Download files from internet via WiFi.
Mass storage to SD card, via native file I/O. R/W support. Emulated as drive A.
Can use DSK files on the SD card too, but only for file read access and sector reading via firmware call.
Upload files via web interface.

See a short demonstration here:

To do
Finish commands.
Lots of error checking.
Bug fixing.
More commands.
Other features.
Should anyone be mad enough to want a similar interface for their Amstrad CPC (or other suggestions), don’t hesitate to put a comment.
If enough are interested, I will run a batch + it’ll motivate me to finish and polish things up.


107 thoughts on “M4 Board – Retrofun, 8-Bit Amstrad CPC WiFi”

  1. Hi

    Very nice interface! Is the software/hardware open source? I’m interesting on emulating it on my spectrum and cpc emulator, ZEsarUX. I have already emulated other sd interfaces, like the divmmc, zxpand or the divide


  2. Hi Duke,

    This is one cool board.
    I really like the web interface feature.

    Could be mad enough to want one, if the price is right. 🙂
    Any thought on how much is it going to be?
    (Probably very early to ask, but… 🙂 )

    Will this board have extra RAM, like on the Symbiface II interface?
    (I am not sure, this might not be necessary, maybe becasue of Symbos compatibility….)

    What filesystem can be used for the SD card? Fat32?

    I own a Schneider CPC, will it be possible to connect this board to
    its centronix expansion ports?


    1. Hi Tamas
      The price is going to be 40 euro for the board. There is no RAM expansion build into it, I originally wanted to add another 64K (from the 192K of the cortex) but there is simply not enough processing time for the code logic, when also doing romboard emulation and I/O port transfer.
      Filesystem is plain fat 32.
      For the Schneider, yes, but you need a cable (not included with the board). You can look for MX4 (MotherX4) it should work with that.
      Check out the cpcwiki forums too, there is a lot of talk about it: http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/amstrad-cpc-wifi/

      1. Hi Duke,

        Thank you for your response. I believe the price is reasonable.
        I am definitely interested, please count me in for one board.
        Do you have any idea when a batch could be released?

        I am not being impatient, I just would like to know
        when I need to get the payment ready. 🙂
        (Weeks, months…)

        One more question, does this board need any external power
        source? If yes, can you recommend one that would work with it?

        Thank you


        1. Tamas,

          I hope about 4-5 weeks for the first to start shipping, I need to make a lot so I don’t know how long it will take.
          It should be OK with the CPC power supply, but you can also use an external USB power supply (5V, 1A).

          1. Hi,

            So not earlier than June/July…
            OK, thanks for all your answers and for doing this!
            Please let me know when it is time to purchase. 🙂
            (But I will try to monitor the cpcwiki.eu forum,
            I am a member there.)


  3. Hi Duke

    Well done. I’m *really* interested in such a M4 and also might offer some very limited time in tests, bugfixing and extension. The main question resides on the M4: is it running an OS, or is it a native running application, handling the IO? I assume the later one. So some more info might be neccessary for contribution on that (I’m not an ARM specialist).

  4. Hi Duke. Firstly, thanks for making things like this board. And secondly, I am really interested in a M4 too, if it is possible. Regards.

    1. Hi Manuel

      Thanks. The first batch of boards is sold out already, but if atleast 10 more want one I will do a new batch (2 out of 10 now, so I think it’s possible). I’ll put you on the list.

        1. Hi Duke. I received (months ago) and…it is outstanding! I wonder if it would be possible to ask for another M4, this time with a MX4 connector (it’s for a 6128+). Thanks.

          1. Hi Manuel

            Good to hear. Yes it’s still possible to order more, there’s a bit of processing time needed (a couple of weeks).


  5. I got mine yesterday, these boards are awesome! In a stroke it replaces the X-Mass, X-Mem* and HxC devices.

    Now we have to simply hope a FTP Client and IRC Client are written to use this card on the CPC 😉


    * OK you still need the X-Mem for the ram expansion.

  6. Hi, I’m interested in acquiring this amazing piece for my Amstrad CPC 6128. How can I order? Cheers.

  7. Hi,
    I want a M4 with Edge connector (I do not own MX4 board, so, i have to connect directly to my CPC).

  8. Hi Duke, I’m interested in acquiring this fantastic piece for my Amstrad CPC 6128 too; how can I order?

    I don’t know if it is neccesary to have any connector or similar or not, or I can connect it directly, please tell me ok?

    Congratulations, awsome job.

  9. Hello Duke,
    I would like to order a M4 board with MX4 connector and a PCB adapter assembled. Can you email me back?

  10. I think my CPC 6128 needs this! Please let me know how to get hold of a board I can directly use with my machine.

  11. hola DUKE.

    Quiero 1 M4 board con un conector para un amstrad cpc versión española y otro conector para amstrad cpc plus versión española.

    te puedes poner en contacto para poder tenerlo. muchas gracias

    ahora te lo pongo en ingles con google, por que yo solo hablo español.

    Hello duke

    I want 1 M4 board with a connector for an amstrad cpc spanish version and another connector for amstrad cpc plus spanish version.

    You can contact in order to have it. thank you very much

    Now I put it in English with google, because I only speak Spanish.

  12. Hello,

    I am from UK. This is such an amazing project and good to see CPC is still being expanded even in 2016.

    I would like to purchase a board if possible?

    Please let me know if it is possible, thank you. I have CPC464 & CPC6128

    Kind regards,

  13. Hello! Congrats for the amazing project. I would like to buy one M4 board. Please contact me back to arrange.
    Thanks in advance!

  14. Hi, I purchased one M4 board from Duke last June (I think it was the first batch…). I ordered it with edge connector. Now I have an MX board and I would like to plug the M4 to it… Somebody is interested (including you Duke) in an exchange… My board is in excellent state … I only plugged it a couple of times and it works perfect… Thank you in advance
    Best regards

    1. Hola.

      Soy Manel, de España. Ponte en contacto conmigo si aún tienes el interface. El conector Edge es para los primeros CPC, ¿Verdad? Gracias.

      1. Si, pero me gustaría conectarlo a la MX4… He pedido un cable que aún no me ha llegado. Cuando me llegue lo probaré si no quedo satisfecho podría cambiarte la M4 Edge connector por una M4 Centronics o vendértela y comprar otra a Duke con conector centronics… Mi email es jomicamp@hotmail.com

  15. Hello Duke,
    Congratulations on the project.
    I would be interested in an M4.
    Please add me to the list.
    Thank you.

  16. Hello.

    Thanks for this amanzing project. Do you expect to make an unit with RAM Expasion? It would be the major achievement I can imagine together with unlock 8.3 chr name limitations. Would you modify this in the future or your card will be as is?

    I own a CPC6128+ and a CPC464. Centronics and Edge Connectors. Maybe is possible to get a conversor to use in both systems, doesn´t it?

    Thanks again and merry Xmass.

    1. Hi
      Sorry for late reply, just got home from xmas holidays.

      As it is, I don’t plan to make a version with RAM expansion. There is no 8.3 char limitation anymore, latest firmware has |ls command and support long filenames.
      For connectors, it is possible to buy version with MX4 (plain IDC) connector and I also have cables:
      MX4 to Edge connector adapter 7 euro (for regular CPC464/664/6128)
      MX4 to Centronics connector 7 euro (for CPC+ and Schneider CPC6128).

  17. Hi, I’m interested in acquiring this amazing piece for my Amstrad CPC 6128. How can I order?

  18. Hello Duke! I’d like to buy one board for the Amstrad cpc6128. Congratulations for the project.

  19. Hello

    This looks really fett. I’d like to order one with the edge connector (regular cpc 6128) if it’s still possible.

  20. Hello Duke,
    I’ve been just reading the cpwiki thread. Really fantastic job! Congratulations. Seems the final device for Amstrad CPC, from my point of view of course.

    That’s why I would like to know if I am not too late to order 1 board, with Edge connector, vertical position (I think it is the current version). My CPC is regular CPC6128.

    Thanks a lot!

  21. Hi Duke

    Been getting back into the CPC scene after a few years and just found out about your fabulous work on cpcwiki.

    I’d like to order 1 board with edge connector for my regular 6128. If that’s still possible please send me the relevant info.


  22. Hello, Folks.
    I just received this some kind of miracle yesterday. I had only time to do a few tests. My first impression: MUST OWN FOR CPC.

    Amazing transfer speed. Lots of improvements in this updated 2.0 firmware. I had to do a lot of research but I´m glad with my Little beauty.

    Note: Tested only on my CPC6128 PLUS. Need to to things on standard 6128 and 464.

  23. I am interested in one plus two adapters one for old school CPCs and one for the plus range. Would that be possible?

  24. Hi, I’m interested in acquiring this great piece for my Amstrad CPC 6128.

    Thanks in advance.

    P.D.: You are my new God!

  25. Hi there,
    I own an Amstrad CPC 6128 and would like to buy an M4. Am I right in thinking that I can store DSK images on the SD card in the M4, and then run DSK images from the M4? Would I need any additional software? Is it fairly easy to use? Which would be the best M4 to get so that I can mainly run DSK images and get W-FI access?


    1. Yes it can use DSK images, just as shown in th video. No extra software is needed, everything can be configured via a browser, aswell as uploading DSK’s and files.
      The M4’s have same functionality, only difference is the connector (PCB layout has also changed a bit, but its only cosmetic).
      Email sent.

  26. Hi, I would love one of these to please.

    I have a CPC6128 with an IDC socket (pins) soldered onto the edge connector to if you can send one that has no connector fitted then I can take it from there.

    I have Paypal and CC but not BC. I would prefer Paypal if you can do that.

    Do you still have some in stock or will it take a while?

    I am in Australia.

  27. Hi!

    I would like to buy am M4 board with edge connector (CPC464 & CPC6128 spanish version).

  28. Hello

    I would like to buy M4 board with edge connector (CPC464) spanish version.
    thank you

  29. Hi, duke. I would like to order an m4 for an amstrad 6128 Spanish model. I wait for your email when possible. Greetings and thank you

  30. Hello. I want to buy one M4 board for me. I heve got a Amstrad CPC 6128. Could you tell me if I can buy one for me? thanks

  31. Hi, Duke, I am very interested in purchasing an m4 board with mx4 connector, with two cables, one mx4 to centronics (for my 464 plus) and the other mx4 to edge (for my cpc 464), waiting for your news, greetings

  32. Nice work, dream is become reality, and now, I wanna absolutely this wifi card for my 6128…
    How can I have this treasure? Mail me a link to buying this jewel! PLEASE!

  33. Hi i want to buy your M4 versión for plug directly to my cpc. Please tell me how can i get one of this cool add no. Regards

  34. Hi! I would like to buy an M4. And one question. Can it write to the SD disk, or only read?

    1. It can write directly to the FAT32 filesystem of the microSD card.
      It cannot write inside DSK images yet.

  35. Hello Duke, I wanted to say your work is amazing! It made me want to fire up my old Amstrad again.
    I would like to order a M4 board with edge connectors for my CPC 6128.
    Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *