Schneider CPC

M4 Board [Schneider CPC]

Last updated on

M4 Board [Schneider CPC]

M4 Board – a very simple name for a great new board for the Schneider CPC – this time from Denmark. I ordered my version with a connector for the already familiar Mother X4.
Work is still ongoing on the device, and fortunately the firmware can be updated relatively easily.

The M4 features a microSD card slot and Wi-Fi! The board can be powered directly from the CPC or via a USB power supply. The M4 has a jumper for this purpose, which can be used to set the appropriate option. If EXT is selected, the CPC’s power supply is used; if USB is selected, the USB port is used.

There are two status LEDs:
ON – indicates whether the board is powered (blue LED)
DD – Disc Drive – this LED flashes when data is being read from or written to the SD card

The switch on the M4 can be used to reboot both the board and the CPC

Usage
Insert a microSD card into the M4 Board. It is best to format this using FAT32. Then switch on the CPC.
From this point onwards, the SD file system can be used – e.g. SAVE/LOAD/RUN/CAT etc.
LOAD/SAVE should behave as normal – if no file extension is used, it is automatically added (., .bas, .bin) – .bak files are generated when files are overwritten using SAVE.

If you wish to use the web interface, Romboard, real-time clock or file downloads from the internet, you will need to configure the network settings.

This can be done using an RSX command: |netset,““

Parameters
name – NetBIOS name; use uppercase letters and numbers only
ssid – Name of the Wi-Fi network (case-sensitive)
pw – Wi-Fi network password
dhcp 0 = disables DHCP and uses a static IP, 1 = uses DHCP (static IP settings are ignored
ip – static IP for the CPC
gw – Network gateway
nm – Network subnet mask (normally 255.255.255.0)
dns1 – DNS server (e.g. Google: 8.8.8.8)
dns2 – Backup DNS server (e.g. Google: 8.8.8.4)
ntp – NTP time server – used to synchronise the time
tz – Time zone – can be +/- 12 hours – set according to your own time zone

Example when using a DHCP server

|netset,“name=CPC6128, ssid=NETGEAR, pw=12345678, dhcp=1, dns=8.8.8.8, dns2=8.8.8.4“
That’s all you need to get connected to the internet. The rest of the settings can be configured via the M4 Board’s web interface.

Check the settings
|netstat
if the connection is working, the IP address will be displayed

You can enter this IP address into a browser (or the NetBIOS name that was previously set) and configure the remaining settings under ‘Settings’

If the NetBIOS name is used:
http://CPC6128
It may take a moment the first time you use it, as the computer first needs to link the NetBIOS name to the IP address.
If the IP address is used:
http://192.168.178.203

Once the initial settings have been configured, the relevant data is saved to the microSD card in the m4 folder as config.txt. This file can also be edited, allowing changes to be made directly. The next time the device is switched on, these settings will be loaded and the CPC will automatically connect to the internet. It is recommended to use a static IP (rather than DHCP), as this ensures that the M4 board connects almost instantly.

M4 Board - Rückseite
M4 Board – Rückseite

File system
For compatibility reasons, file names are displayed in the 8.1 format. Directory names are displayed in full if they consist of fewer than 17 characters. If the names are longer, short names are used.

Commands
The same commands are used as in the original system, e.g. load, save, run, openin, openout, cat etc.

To ensure proper handling of directories, Wi-Fi and other features, a number of RSX commands have been added and their capabilities expanded.

On CPCs running Basic 1.0 (e.g. CPC464), the RSX commands work slightly differently, meaning that parameters cannot be passed directly to the RSX. In this case, they must be passed via a variable.

e.g. changing to a subdirectory (the name of the directory is: DISCS)
BASIC 1.0:
A$=“DISCS“:|cd,@A$
BASIC 1.1:
|cd,“DISCS“

Important commands and their meaning/use

|CD – change directory, as in DOS
|cd,“games” – changes to the “games” directory
|cd,“games/batman” – changes to the “games/batman” directory
|cd,“.. – go back one directory
|cd,“/ – return to the root directory of the SD card

DSK files, which are used in many emulators, can also be used like directories
|cd,“robocop.dsk“ – changes to the DSK file as if it were a folder
|cd,“.. – jumps back out of the DSK file
Note: DSK files are currently read-only!

|DISC – switch to the AMSDOS floppy disk drive, if available

|SD – switch to M4 (MicroSD)

|TAPE – switch to cassette

|SNA – Snapshot Image starten
|SNA,“FRANKIE.SNA“

|COPYF – copies file
|copyf test.bas test2.bas (source file, destination file)

|FCP – kopiert Dateien zwischen microSD und Disketten
|FCP,“DATEI.BIN“, „A:“ – kopiert die DATEI.BIN auf Laufwerk A
Die SD-Karte kann auch mit dem Laufwerksbuchstaben C angesprochen werden
|FCP,“A:DATEI.BIN“, „C:“ – kopiert DATEI.BIN von Laufwerk A in das aktuelle Verzeichnis der microSD
Es gibt eine Möglichkeit Wildcards zu verwenden, „*“ zum Kopieren aller Dateien von einer Diskette in ein Verzeichnis
|FCP,“A:*“,“C:“ – kopiert alle Dateien von Diskette A in das aktuelle Verzeichnis

M4 Board Webinterface
M4 Board Webinterface

|REN – Rename file
|ren “new.bas”,“ old.bas”
Just as with CPC floppy disks, the command can also be used to move a file or folder from one directory to another
|ren,“games/robocop.dsk“,“robocop.dsk” – moves the file from the current directory to the games directory

|ERA – eine Datei oder ein Verzeichnis löschen
Es können Wildcards verwendet werden um mehrere Dateien/Verzeichnisse zu löschen
|era,“*.bak“ – löscht alle .bak Dateien im aktuellen Verzeichnis
|era,“spiele/r*.d?k“ – löscht alle passenden Dateien im Verzeichnis „spiele“

|MKDIR – Verzeichnis erstellen
|mkdir,“spiele/discs“ erstellt einen Unterordner im Verzeichnis „spiele“

|DIR – Display directory contents – as with CPC floppy disks – wildcards can be used, similar to the CAT command
|dir,“games/discs/b?t*.dsk“ etc.

|LS – displays directories with long filenames – the maximum length depends on the display mode

|DSKX – DSK extrahieren
|dskx,“somedisk.dsk“,“/pfad“

|TIME – displays the current time if a suitable NTP server has been configured

|NETSET – see above under ‘Basic settings’

|NETSTAT – displays the current status of the network connection

|HTTPGET – download a file from the internet to a specific directory
Parameters: url:port/name
If no port has been configured, port 80 is used
|httpget,“spinpoint.org:80/battro.dsk“ or
|httpget,“spinpoing.org/battro.dsk“

HTTPMEM – a file is loaded from the internet into memory; the maximum size in a single operation is 0x4000 bytes, but an offset can be specified, allowing more data to be loaded in chunks
Parameters: url:port/name, memory address, size to read
|HTTPMEM,“spinpoint.org/FIST.BIN“,&C000,&4000
Example with offset: |HTTPMEM,“spinpoint.org/battro.dsk, offset=0x10000“,&8000, &1000

|ROMUP – ein ROM in einen bestimmten Slot laden.
|ROMUP,“UTOPIA.ROM“,15 – lädt das Utopia ROM in Slot 15

|M4ROMOFF – disables the M4 ROM until the next reboot – used when access to the standard floppy drive is required or a CPC+ cartridge needs to be booted

|VERSION – displays the current firmware version of the ESP8266 and Cortex M4

|UPGRADE – downloads the latest firmware from the internet, if available. The M4 board must then be restarted – either using the reset switch or by switching the power off and on again. The upgrade process will then begin, and once complete, the board will display the normal power-on message again.

Erfahrungen
Auf die SD-Karte hatte ich vorher schon ein paar DSK-Dateien kopiert. Erst mal alle anderen Interfaces aus dem MotherX4 Board abgezogen und das M4 Board angesteckt und CPC eingeschaltet – nicht gut. Also doch ein Netzteil an das MotherX4 (ich nehm 5V 1A). Nun ist nach dem Einschalten alles OK. Als erstes gleich mal CAT eingegeben und siehe da: funktioniert schon mal. Die SD-Karte wird als A: angesprochen. Als Nächstes mit |NETSET das WLAN eingerichtet und mit |NETSTAT eine IP zurückerhalten. Passt 🙂 Nachdem ich im CPC Forum schon von einem Firmware-Update gelesen hatte, hab ich |UPGRADE ausprobiert und auf Version 1.03 aktualisiert. Als nächstes das Webinterface testen (IP-Adresse eingeben die |NETSTAT anzeigt). Dort gibt es vier Reiter – einen für Dateiupload, einen für das ROM-Board, einen für die Einstellungen. Alles sehr übersichtlich und im CPC Design gehalten. Per Dateiupload eine weitere DSK-Datei »hochgeladen« – nach |CAT am CPC fand ich die Datei auch auf der SD-Karte. Eine DSK-Datei kann auch »gestartet« werden – erst mal die Datei (Disk) mit |CD,“WESTBANK.DSK“  »öffnen« und mit RUN“ starten – läuft auch. Wenn die DSK-Datei länger als 8 Zeichen ist, sieht sie so aus: WESTBA~1.DSK – kann auch geöffnet werden; das ~ Zeichen kann mit Control+2 angezeigt werden. Verzeichnisnamen dürfen bis zu 17 Zeichen haben.

Test beta firmware
Beta versions of the firmware appear from time to time – simply copy the files to the root directory of the SD card, switch on the device, and the upgrade will run. Once the process is complete, the files are automatically deleted.

Use in conjunction with XMEM
As the M4 board also offers 32 ROM slots, this may conflict with the XMEM. The simplest solution is to disable the XMEM’s ROM slots (set the jumper under the large chip to NO). If 64 ROM slots are to be used (XMEM and M4 together), the start position of the ROM slots must be set to 32 via the M4’s web interface, so that the M4 slots are mapped behind the XMEM slots. However, this can cause issues with the position of the M4 ROM, unless you have a CPC 6128 where ROM 7 can be replaced.

Using ParaDOS
Can ParaDOS be used with the M4? Normally, it replaces AMSDOS in Slot 7
-> The M4 ROM can be used in Slot 5, and ParaDOS is then loaded into Slot 6.

Wichtige Firmwareänderungen
v2.0.4 beta 8 – http://www.spinpoint.org/cpc/M4FIRM_v204b8.zip
Sollten 512 KB CPR (Cartridges) verwendet werden, müssen die oberen 16 ROMs des M4 Romboards geopfert werden. Einfach auf der ROM-Seite im Webinterface bei „only 16 roms“ einen Haken setzen.
Ebenso wurde die Möglichkeit hinzugefügt, Cartridges per Webinterface auf das M4 zu laden und zu starten.
Es kann nun auch über das Web Interface Disks gewechselt werden – [CD ON CPC] drücken, wenn die Diskette ausgewählt wurde.

V2.0.4 beta 6 – http://www.spinpoint.org/cpc/M4FIRM_v204b6.zip
– viele Fehlerbehebungen für DSK’s – nun gibt es bei Spielen wie Chibi Akuma wieder einen Ladebildschirm und Spiele mit fragementierten Blocks wie z.B. Ninja Grannies und andere Spiele von @Joseman)
– neuer Befehl – |dskx – DSK extrahieren
Damit können die Dateien aus einem DSK-Image extrahiert werden
Verwendung: |dskx,“somedisk.dsk“,“/pfad“

Useful software
cpcxfer
Command-line tool for transferring files to and from the M4 via Wi-Fi.

YANCC
1. neueste Version herunterladen und auf SD-Karte
2. die entsprechende Diskette aufrufen
3. die Datei „config.bas“ aufrufen und Konfiguration starten – erst mal „Autostart YANCC“ / „Autostart Launcher“ n auswählen
4. YANCC ROM in Slot 1 und Launcher ROM in Slot 9

Disk Navigation
A modified version of Joe Halstead’s Disk Menu programme to facilitate navigation within directories,
1. Save the BAS file in the root directory of the SD card – use the cursor keys to navigate
2. Press the space bar to open a directory or select a file to load or run. Press Cancel to select a different file. 0 = exit the directory
3. If the .BAS file is renamed to autoexec.bas, it will start automatically when the CPC is switched on
4. The programme can be exited by pressing ESC twice

– File Launcher
A simple file launcher as an additional program (ROM) for YANCC, which can, however, be used separately (though YANCC.ROM and LAUNCHER.ROM must be installed)

– Programme menu
with programme and games available to download directly from the internet by Rafa32gr

– M4FE
ein Front-End für das M4 zum Starten von Programmen. Es wird in einen der ROM-Slots installiert und mit |M4FE gestartet. Es kann mit den Cursortasten oder einem Joystick bedient werden. Der Start der Software kann auch auf eine der Funktionstasten gelegt werden – z.B. „F0“ – einfach folgende Zeile eintippen und als AUTOEXEC.BAS speichern:
10 KEY n,“|M4FE“+CHR$(13)

Update 2025
Production ceased in October 2025 – but the data has been published, so anyone can make the circuit boards themselves: https://github.com/M4Duke/m4hardware

Documentation

Conclusion
Duke from Denmark has created a wonderful device here. A mass storage device for the CPC that is easy to use, a ROM board and Wi-Fi to boot. What more could you want? Add to that firmware with a great range of features and excellent support. Its success proves him right – he has already sold over 350 boards! At the same time, he is also working on a new version that can do even more – so we can look forward to seeing how he plans to improve the M4 board.
 

Unterstütze diese Seite

Dir gefällt, was ich auf dieser Site mache? Dann würde ich mich über Unterstützung freuen, die es mir ermöglicht, die Website weiter zu betreiben.

6 responses to “M4 Board [Schneider CPC]”

  1. Hallo Jungsi,
    ich versuche schon seit einiger Zeit ein M4 und XMEM gleichzeitig in einem CPC464 zu betreiben.
    Welche Einstellungen muß ich am XMEM vornehmen und welche im WebInterface des M4 ? Damit ich vom XMEM starten kann und auch die Slots dort mit dem ROMAN sehen kann?

Leave a Reply

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