CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: ikonsgr on 20:20, 05 January 19

Title: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 20:20, 05 January 19
 Hello everyone,

What i'm going to present you here,is a "Universal" serial interface for Amstrad CPC (or USIfAC (Universal Serial Interface for Amstrad CPC)  naming courtesy of Gunhed  :) )
Although i know that other serial interfaces for amstrad cpc already exist, this one offer many innovations that makes it a rather modern, cheap and useful solution:
 
 

* DSCN1147.JPG
(109.95 kB, 605x422 - viewed 335 times)


- Completely "from the scratch" project,based on a modern 8bit PIC 16F1579@32Mhz MicroController!
(all other serial interface projects, use the rather old, expensive and bulky 40pin 16C550 UART chip)

- Very easy to use by only two BASIC commands, INP() and OUT!

- Completely free DIY project, rather easy and cheap to make (total cost for the DIY kit +all extra parts, would be less than 6euros!).

- SUPER FAST loading of many games/programs, DIRECTLY from the PC!(see "Direct Load" function in User's Guide, and here (https://www.dropbox.com/sh/hzp3a4b7fktcn8c/AAAj2U8otKw26j-chnd8uUxla?dl=0) is a list of games already tested and working)

- Easy and fast transfer of dsk images directly to Amstrad CPC disks!

- Easy and fast individual file transfer (https://www.dropbox.com/s/zzl18w9f5dljj9c/GAMES.zip?dl=0) (check link for 1000's of games extracted from dsk images)directly from/to Amstrad's Disks!

- Equipped with a reset button and a pause switch for Amstrad CPC!


And here is a small demonstration: Playing PONG in network with a Commodore 64! (https://www.youtube.com/watch?v=l9rWsShqKsE)   :D

You can find everything you will need here (https://www.dropbox.com/s/0z2cpcbxvl95s9v/Amstrad%20CPC%20serial%20interface.zip?dl=0), it contains:

-The circuit diagram,
-The gerber files for the pcb,
-The bill of materials,
-The Pic 16F1579 microcontroller Hex file (you will need a pickit2/3 (https://www.ebay.ie/sch/i.html?_from=R40&_trksid=p3984.m570.l1313.TR7.TRC1.A0.H0.XPickit.TRS0&_nkw=Pickit&_sacat=0) in order to flash it into PIC 16F1579),
-Amstrad’s utility dsk image disk (you can transfer it to a real disk with CPCDISKXP (http://www.cpcmania.com/cpcdiskxp/cpcdiskxp.htm) using an ide or a usb 3.5" floppy Drive),
-The PC utility program,along with CPCLOADER (for easy extracting dsk images) and a folder including the utility disk files,for direct loading from PC using "Direct Load" function,
-The User's Guide.

I have also developed a windowsprogram which you can use it to comunicate with Amstrad:

 

* driect_scr.png
(69.01 kB, 800x553 - viewed 253 times)


It can be used for terminal file transfer, dsk image transfer, and RUN many games/programs directly from PC!


Serial  Interface is equipped with a big receive buffer of 920 bytes (more than 3.5X the buffer of the classic 16C550 UART chip, or booster/booster+ adapters), and can achieve speeds up to 576000bps, using a direct usb2serial cable adapter, or 460800bps using a Bluetooth or Wifi Module.
Serial interface can be used with a  USB2serial cable adapter (https://www.ebay.ie/itm/USB-To-RS232-TTL-USB-To-COM-Serial-Adapter-Cable-Module-PL2303HX/181921199283?hash=item2a5b5934b3:g:xL0AAOSwo0JWOFVL:rk:1:pf:0)
(PL2303HX), an HC-05 Bluetooth module (https://www.ebay.ie/itm/1-2-5-10PCS-HC-05-6-Pin-Wireless-Bluetooth-RF-Transceiver-Module-Serial/302097888911?var=600910990260), a WiFi module (an ESP-07 (https://www.ebay.ie/itm/ESP-07-ESP8266-Remote-Serial-Port-WIFI-Module-V1-0-ESP-Adapter-Plate-Expansion/282765960472?ssPageName=STRK%3AMEBIDX%3AIT&var=582047875339&_trksid=p2057872.m2749.l2649) or an ESP-01 (https://www.ebay.ie/itm/ESP8266-ESP-01S-Serial-WIFI-Wireless-Transceiver-Module-Send-Receive-AP-STA/302181509741) along with a 5V adapter (https://www.ebay.ie/itm/ESP8266-ESP-01-01S-02-03-04-05-06-07-08-09-10-11-12-12E-12F-13-14-WIFI-Module/262852020763?ssPageName=STRK%3AMEBIDX%3AIT&var=561850933808&_trksid=p2057872.m2749.l2649)) or even
this (http://www.hobbytronics.co.uk/usb-host-mini) Usb host board which, depending on loaded software, can host many different USB devices, like USB modems, flash drives, keyboard,mouses, joysticks, Midi interfaces etc. So, if you connect this usb host module to the serial inerface ,ALL of these devices can potentially communicate with amstrad cpc!
In practice, any device with a UART interface can be connected!


So, first let's take a look at the circuit (https://www.dropbox.com/s/sxj0objy1xctg0l/schematic.jpg?dl=0). And this is the pcb board (https://www.dropbox.com/s/31z65d5t8i7u8tb/DSCN1147.JPG?dl=0).
(https://www.dropbox.com/s/31z65d5t8i7u8tb/DSCN1147.JPG?dl=0)
You can connect it to an external port raiser adapter like MX4 board, or directly to Amstrad’s Expansion port using this (https://www.dropbox.com/s/ka6m4fyqangan30/DSCN1148.JPG?dl=0) adapter.
Interface usage, is pretty simple and straight forward. Communication with the device is accomplished using only two ports:
&FBD1: The control port
&FBD0: the data port

And the two BASIC commands INP() for receive and OUT for send.
To send a byte, just give the BASIC command:
OUT &FBD0,x (x:0-255)
Or on assembler, the instructions:
LD A,x (x:0-255)
LD BC,&FBD0
OUT (C),A

To receive a byte, you must first check if there is any byte available at the buffer, by reading the control port.
Use the BASIC command: INP(&FBD1). If it returns ‘255’, there is a byte available, if not, it returns ‘1’.
So, in order to receive a byte from serial port, you just give the BASIC command:

IF INP(&FBD1)=255 THEN A=INP(&FBD0) (variable A contains the received byte)

And if you want to wait until a byte is available, you can use a small loop like:

WHILE INP(&FBD1)=1:WEND:A=INP(&FBD0)
And here is the assembly code for doing the same thing:

check_BYTE:   
        LD A,&FB
        iN A,(&D1) 
        DEC A
        JR Z,check_BYTE
ld   a ,&FB
in   a,(&D0)

Accumulator A now has the  received byte.

You can also give various commands to the interface (OUT &FBD1,x), using the control port, like reset interface, change serial port speed, clear receive buffer and some other.


And If anyone wants a ready made Serial interface, i can offer:

- A ready made board for 9euros+shipping (2.5euros for standard, 5euros registered/tracked).

- A Basic DIY kit for 4euros,including postage. You will get the PCB board and PIC 16F1579 (flashed with the program).All other parts can be easily found in any electronic parts shop,check Bill of Materials here (https://www.dropbox.com/s/0z2cpcbxvl95s9v/Amstrad%20CPC%20serial%20interface.zip?dl=0))

- A Complete DIY kit for 6euros,including postage. This DIY kit will have everything:PCB board+PIC 16F1579 (flashed with the program)+4002Logic Chip+DIP sockets+Pause switch+reset button+resistors+caps+bjt+diode

- Extra Edge connector adapter costs +2euros.

- Extra Centronics connector adapter costs +5euros.



 Having a cheap, easy to make and easy to use Serial port, and considering the strong and vivid program community for Amstrad CPC, it could open many prospects for future developments, like LAN or WAN games, Apps for communicating with smart phones and tablets, even a basic Web client...  ;)

Title: Re: Universal Serial Interface for Amstrad CPC
Post by: GUNHED on 22:57, 05 January 19
Very nice project indeed. However that's the same we already have with MiniBooster and CPC-Booster+. But cheaper and probably more easy though.  :)

What I would love to see are:
- A way bigger buffer, because with that high transfer rates 1 KB buffer is filled up literally in no time. So a buffer of at least 16 KB would be helpful.
- Either a 2nd port or a RS4xx, to enable a network of a ring of CPC computers. Great fun on meetings.

That's just my 3 Pfennige, since I'm more a software person I don't know if this is doable.  :)

Good luck with it anyway, look great!  :)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 01:52, 06 January 19
Well, i don't think that  MiniBooster and CPC-Booster+ are "competitive" to this project. For one thing, they offer much more than a serial port (A/D converters, PWM channels etc pretty much like MULTI purpose I/O device), and for that, are surely much more complicated and expensive to make. Moreover,they are pretty old projects, so i really don't know if they are available any more...  ::)
My intention was to design a small, cheap and easy to make (and use) serial port, that everyone with a soldering iron and a few euros, could make it by himself!  ;)


As for your requests,at one thing, it's difficult to find 8bit Microcontroller with 16+KB of ram, and they would be rather expensive too.But i think that a nearly 1Kb receive buffer, is already pretty much (16C550 UART and booster boards have much smaller buffers of ~250bytes), and believe me, if you use assembly code, it's easy to empty the buffer really fast too! :-) In anycase, you will always need to have some transfer control for fast speeds ,regardless of the buffer size you have. One good solution for example,is, for the sender to transmit a packet of bytes at the size of buffer at once, and then wait for acknowledge, to send the next. As for the networks, it's easy to make one ,using the WiFi modules! These WiFi ESP8266 modules can either connect or create TCP servers! So, you can have one Amstrad with a serial interface and a WiFi module running a TCP server, all other amstrads can connect to this server as TCP clients,and here is your Amstrad CPC network! ;-)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ComSoft6128 on 11:27, 06 January 19
Individual/batch file transfer from/to the 3" drive interests me, transfer from the 3.5" B drive is what I'm really looking for but that might came at a later date.
I'd like to buy one for a 6128 Plus.

Cheers,

Peter
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 13:18, 06 January 19

Ok, peter, send me your address with a pm or to my email ikonsgr745@hotmail.com to arrange it then.
Now,i think you're gonna love this, INDIVIDUAL file transfers from/to 3" disks was the reason i design this interface at the first place!  :)
I have dozens of 3" disks ,from the good old era, with many programs and listings me and friends had made, but the procedure to transfer them to a pc for safe keeping was somewhat combersome and timeconsuming, as all existed transfer methods are for copying hole disks or dsk images at once! So, i had to copy 3"disks to 3.5" disks using discology, and then (using an old pc that has an ide floppy drive), transfer the 3.5" disk to a dsk image using cpcdiskxp...
Now,i can just select individual files from a 3" disk and with a press of a button, transfer them directly to my pc! And, after a lot of study and work (http://www.cpcwiki.eu/index.php/Programming:Read/Write_a_file_quickly_byte-by-byte),i've managed to do it rather fast too, it takes less than 15seconds to transfer a hole 42kb game from 3"disk to pc, and about 20seconds for writing it back to a disk from pc!
In 2 words, having this interface, allows you to use your amstrad without needing ANYTHING extra, either a 3.5" drive, or a gotek emulator drive, just a good old 6128 with a bunch of 3" disks ;)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ComSoft6128 on 13:30, 06 January 19
This sounds ideal ;D
Will PM to organise.

Thanks,

Peter
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: GUNHED on 15:41, 06 January 19
Ah, so if I do understand that right, we can have a few CPCs with your card and the WiFi-modules and they all can talk to each other, right?

Since I'm not familiar with WiFi at all: Do we need a WiFi router unit for this, or do we just need some CPCs with your card + Wifi module?

Also: How would this look like from the software side?

This would be really a great thing, to have a network based on CPCs (without PCs).  :) :) :)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 18:22, 06 January 19
Exactly! Esp8266 it's really a marvel-chip, apart from creating a tcp server or connecting to another, it can be also used as an access point!
So, if you have a bunch of amstrad cpc's with serial interfaces and wifi modules installed, you can set the tcp server and the access point at one of them, and then, all the others can  connect to this access point, get ip's, and then connect to the tcp server, and thus create an Amstrad CPC-only wireless LAN,without even needing a router!It might sound complicated, but it's really a matter of a few AT commands to do all this!
I already have a small section in my user guide, that has a small list of the most useful AT commands, although the complete AT user manual (https://www.dropbox.com/s/wetg5asxy6nynst/4a-esp8266_at_instruction_set_en.pdf?dl=0) for the wifi module supports 100's of commands!
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: GUNHED on 19:13, 06 January 19
That really sounds awesome! Now we need somebody who can use AT commands and tell us how to make such a CPC LAN.  :) :) :)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 11:19, 07 January 19
That really sounds awesome! Now we need somebody who can use AT commands and tell us how to make such a CPC LAN.  :) :) :)


Well,it's so easy to do it, that i'm pretty sure ,if you take a look at the user's guide and the BASIC terminal program, that "somebody" may well be... you!  ;)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ComSoft6128 on 17:09, 07 January 19
And this is one D20 disk - have a look at the number of files for transfer :o
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: LambdaMikel on 17:32, 07 January 19
Exactly! Esp8266 it's really a marvel-chip, apart from creating a tcp server or connecting to another, it can be also used as an access point!
Isn't that chip also on the M4 board?
(well or related, it has the ESP12F)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 15:54, 08 January 19
Isn't that chip also on the M4 board?
(well or related, it has the ESP12F)
I suppose so, the chip is actually called ESP8266, and comes either as plain chip on a board or on board various pcbs for easier communication with existing hardware like ESP-01, ESP-07 which only need  Tx, Rx and power supply connections.
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: GUNHED on 23:13, 08 January 19
One more question: Is the port of this nice device compatible to the Mini-Booster Pins? Sorry, for that question.  :)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 00:59, 09 January 19
The serial port consists of only 4 pins, Tx, Rx, 5V and ground, so in practice any device with a UART interface can be connected!
Apart from the bluetooth and WiFi modules mentioned, there is also this (http://www.hobbytronics.co.uk/usb-host-mini) Usb host board which can be connected directly to the serial interface,and depending on loaded software, can host many different USB devices, like USB modems, flash drives, keyboard,mouses, joysticks, Midi interfaces... 
So if you connect this usb host module to the serial inerface ALL of these devices can potentially communicate with amstrad cpc!
Hmmm, read/write files to usb flash drives? That sounds nice... 

or maybe, sending SMS messages with your CPC? That sounds fun too...
And what someone could possibly do with a Synthesizer connected to an Amstrad CPC through midi?....    Infinite prospectives! :D

It  would be only a matter of developing the software on amstrad cpc  to do this! And considering the simplicity and ease of use of the serial interface, it would be rather easy to develop such programs even using locomotive BASIC!    ;)


Title: Re: Universal Serial Interface for Amstrad CPC
Post by: rpalmer on 05:31, 09 January 19
to connect any modern device such as USB the CPC would need a driver of significant code in order to get it to work at all.

rpalmer
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: LambdaMikel on 07:32, 09 January 19
I could certainly use an RS232... don't have one yet.
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: LambdaMikel on 07:35, 09 January 19
to connect any modern device such as USB the CPC would need a driver of significant code in order to get it to work at all.

rpalmer
depends. there are certainly also rs232 / serial devices which have the controller and driver "on board" and don't need complicated drivers.
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 10:54, 09 January 19
to connect any modern device such as USB the CPC would need a driver of significant code in order to get it to work at all.
rpalmer

Fortunately for us, the "driver" needed for a usb device, is already implemented in the usb host module firmware mentioned! Take a look here (http://www.hobbytronics.co.uk/usb-host-mini) and select "related products" tab.
All the "dirty" work needed for identify,nagotiate and establish connection with a usb device, is done from host module!
After that, you can perfectly communicate directly with the device through serial port simply by sending/receiving bytes/characters using simple inp() and out commands, even using BASIC! ;)


Title: Re: Universal Serial Interface for Amstrad CPC
Post by: rpalmer on 14:20, 09 January 19

Fortunately for us, the "driver" needed for a usb device, is already implemented in the usb host module firmware mentioned! Take a look here (http://www.hobbytronics.co.uk/usb-host-mini) and select "related products" tab.
All the "dirty" work needed for identify,nagotiate and establish connection with a usb device, is done from host module!
After that, you can perfectly communicate directly with the device through serial port simply by sending/receiving bytes/characters using simple inp() and out commands, even using BASIC! ;)
Well yes you are correct that this device appears to have done all of the work to convert the "serial" to "USB".

There is still the matter of a driver to handle such things as protocols like USB packets from Wifi, keyboard, mass media and so on. This i feel is where the majority of the work will be for a CPC to use such a device. Also dont forget a USB device is not one in which it provides an interrupt to the host meaning the CPC would constantly be polling it for status if done entirely in S/W and would need to handle what ever packet sizes the USB could issue (not impossible, but can be very difficult to handle and by all means give it a go).

I could easily imagine though a H/W device much along the line of a CPC I/O port to a simple PIC chip which then interacts with the above attached USB device. The pic chip would then interrupt the CPC following the Z80 protocols.
rpalmer
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 15:34, 09 January 19
First update: "Cold Start" having ONLY an Amstrad CPC!  :)

Ok, you have the serial interface, but in order to use it, you need to have some utlitites on your amstrad.
Of course i give you a utility disk image, but the "problem" is that you need first to transfer it to a disk (or to a usb stick if you have a gotek/hxc drive), in order to use it...
How nice would it be, if you didn't need to do that, and be able to use the serial interface t
o transfer programs, games,utilities,DIRECTLY, having ONLY a  plain Amstrad CPC...

Well, now you can do that! ;)

The "trick" to accomplish this, is by using a small BASIC program loader, that initally copies the assembly routine for file transfers from PC to CPC, DIRECTLY to Amstrad's memory, and then it's executed, in order to transfer files to a floppy disk!
Procedure is very simple and fast:
First, type and save this small BASIC listing to your Amstrad CPC:

10 MODE 2:MEMORY &7FFF   
20 OUT &FBD1,0:OUT &FBD1,1   
30 FOR I=0 TO 127
40 WHILE INP(&FBD1)=1:WEND
50 POKE &8000+I,INP(&FBD0)     
60 NEXT I
70 OUT &FBD1,0:OUT &FBD1,1   
80 PRINT"waiting for file..."
90 WHILE INP(&FBD1)=1:WEND
100 OUT &FBD0,9:OUT &FBD1,2:CALL &8000       
120 PRINT"file copied":OUT &FBD1,3:GOTO 70


Run the program, and open the Communication Utility on your PC, press 'Connect button' to establish a serial connection,and then press “Cold Start” Button. (function selection must be set to ‘Terminal’ and serial Speed to ‘115200’)
After a few seconds,you should get a “waiting for file…” message on your Amstrad screen. Now select “File copy to CPC” from Function selection list, press ‘select files’ button,and select the files “PC2CPC.BAS” and “PC2CPC.BIN” inside "Amstrad Utility disk files" subfolder in program’s folder. After a few seconds the 2 files should be transferred to your 3” disk.
Now, you can reset your Amstrad and run the “PC2CPC” utility, in order to transfer any other program, utility or game you want from PC!

I have updated the PC utility program and add the procedure to the User's guide, along with some extra Wifi AT commands (useful for making a wireless "Amstrad cpc only" network!)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: GUNHED on 16:44, 10 January 19
Hi Ikonsgr,
Well, I would like to order 5 of these boards (or DIY kits). Please PM me the details. It's a great device for a great price and it has the potential to become a new network / communication standard.  :)
EDIT: MX4 version please.  ;) :)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: asertus on 17:32, 10 January 19
Hi,


I am interested in 2 of them, with adapters.


THanks.
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 19:04, 10 January 19
It's a great device for a great price and it has the potential to become a new network / communication standard.  :)


Well, that exactly was my intention! It surely has all the "requirements" for that: DIY,Cheap,easy to make and use.
If it get's enough acceptance from the community, it can surely become a standard. ;)




Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 19:15, 10 January 19
NEW UPDATE!


I've uploaded a new utility disk image, i add a small FORMAT utility (i compiled this (http://www.cpcwiki.eu/index.php/Programming:A_simple_disc_formatter_using_BDOS_functions) assembly code from CPCWIKI with maxam, hope there is no problem wtih that), and revised the User's Guide with some extra info.Also i upload a big collection of many games extracted from disk images ,(you can find them in the 1st post), in order to easy transfer them to disks using the PC to CPC function.
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: Etegar on 19:46, 12 January 19
Hi Ikonsgr,


Very interesting project. I would like to order 1 board if it's available with the edge connector adapter.

Thanks
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: Dandare on 18:16, 13 January 19

Nice project,

I'm curious: at 32Mhz, a pic16 runs one instruction each 125ns.
Given that you need to identify the port, whether it's read or write, and either capture the bus or put the right response back in the bus (and take it out before the next instruction), I would say the timing is almost impossible to get right, considering you have less than 1us (8 pic asm instructions) to do it all.


Congratulations on the achievement. I can't imagine how you do it unless you are inserting wait states like there's no tomorrow  :)
(Does that pause switch gives a hint about this?)

Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 23:50, 13 January 19

Nice project,
I'm curious: at 32Mhz, a pic16 runs one instruction each 125ns.
Given that you need to identify the port, whether it's read or write, and either capture the bus or put the right response back in the bus (and take it out before the next instruction), I would say the timing is almost impossible to get right, considering you have less than 1us (8 pic asm instructions) to do it all.
Congratulations on the achievement. I can't imagine how you do it unless you are inserting wait states like there's no tomorrow  :)
(Does that pause switch gives a hint about this?)


You are right, there is NO way all these to be done in less than 1uS, unless you have a PIC running at 200Mhz... :D 

So, of course amstrad need to be paused when circuit is activated (you just force "READY" signal to low and Amstrad can freeze.... for ever!),although the hole code execution for each sent/received byte is done in a few microseconds!
Now, apart from the need of instant activation of the curcuit and pausing of amstrad (which in the end ,was done using a logic gate chip, it was really impossible to do it using the pic and software routine, as they were too slow even @32Mhz),the most difficult part, was the correct reading of a  byte from serial port! The precise latch/unlatch of PIC's data port to amstrad's data bus, seemed to be impossible to achieve!
At some stage of development,i was so frustrated of not being able to sync everything right, that i thought the only way to do it, was using an extra octal 3state buffer chip (which is as big as the PIC itself ::)  ), between cpc's 8bit data bus and pic's data port, and enable it by IORQ signal (so the buffer would "automatically" make the correct "latch/unlatch" of pic's port to cpc's data port).
But then suddenly...an idea "hits me": studying in detail how Z80's is reading a byte from a port and combining this knowledge with the way Amstrad allows access of I/O buses to Z80, i managed to resolve this, by using only a small rudimentary "sample & hold" circuit (just a small diode and a capacitor) of the READY signal that fed a pic's input pin! You see,i discover that in the proccess of reading a byte from a port, i can ensure that the byte was "downloaded" correctly to accumulator when the 1st high pulse of ready signal occured AFTER unpausing amstrad. So what i did, was, unpause amstrad for 0.25uS (e.g. 1cycle @4mhz, exactly the clock of Z80 ;) ) and then repause it again. If in this time, the "sample & hold" pin was High, it means that byte was taken, and i could proceed to unlatching Pic's data port from amstrad's data bus and unpause amstrad completely! If not, then i issue again a 0.25uS cycle of "unpause/pause"  and do the same check! That way, i managed to "bit bang"  pic's port at exactly the correct time and with the minimum ovehead ,the hole check of "sample & hold" code, each time amstrad is paused, executes in only 0.5us!

I began to deal with this project since summer of 2017, and have spent literally many 100's of hours on this! In the process, i got involved with assembly programming (i even developed a code (http://www.cpcwiki.eu/forum/programming/how-to-readwrite-a-file-'byte-by-byte'-using-firmware-but-much-faster!/msg162099/#msg162099)
for fast read/write files byte by byte using firmware, because of this project!), DELPHI programming on the PC, PIC programming, basic programming on CPC, learn to configure and use bluetooth modules, wifi modules, usb to serial interfaces,and ofcourse  design the schematics and the pcb board for the circuit...

To get an idea, i began with this:
https://www.dropbox.com/s/g1zvz97hb67oql6/DSCN0752.JPG?dl=0 (https://www.dropbox.com/s/g1zvz97hb67oql6/DSCN0752.JPG?dl=0)
Which is evolved to this :
https://www.dropbox.com/s/dv9fo1zi7k6cpij/PROTOTYPE2.JPG?dl=0\ (https://www.dropbox.com/s/dv9fo1zi7k6cpij/PROTOTYPE2.JPG?dl=0\)
And finally end up to the pcb board shown in the 1st post...


Surely, it was a lot of trouble but, i did it  *mostly* as a hobby, a fun of making something creative,  and in the end,  sharing any knowledge and achievement with the community!


Long live Amstrad CPC! :)  
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: Dandare on 11:00, 14 January 19
Very nice,
just a hint for future projects you may get yourself involved with: (Maybe you already know about it)
PICs with a Parallel Slave Port (http://ww1.microchip.com/downloads/en/DeviceDoc/31010a.pdf) will save you a lot of trouble and will let you interface with the CPC without wait states.


Downside is you'll have to go to a 40pin package at least to get that peripheral.

Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 21:24, 14 January 19
That's really very nice feature! Sadly, microchip doesn't provide this feature to the parametric search list ,so it's difficult to find what models have this feature.
Anyway, if the "smallest" pic with such feature is with 40pins, i'm afraid it's way too large, bulky and with "overkill" pincount  (and probably much more expensive at least newer models with internal 32Mhz clock) for this project.
My first priority when i was looking for a suitable PIC, was to be able to operate at least @32Mhz (with internal osc), have 1Kb RAM, Hardware Uart, and have the minimum pin count for my needs (20 or 28 at most). Besides 16F1579, there is another  "pin compatible" and with similar features PIC ,16F1459 which operates at 48Mhz. I haven't tested yet, but i believe it can work directly (just with a different Hex file ofcourse) on the same board, and so you can have a "Turbo" version of the serial interface ,+50% faster!

Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 10:42, 17 January 19
I just add a new "half price" purchase option (pcb board+PIC flashed with program).
With this, anyone can easily build the board by himslef, needing only a soldering iron!   ;)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: LambdaMikel on 17:14, 17 January 19
Hi John,
I'd like to order 2 - assembled, if possible  :) Please send me PM for payment instructions.
CheersMichael
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: krusty_benediction on 10:05, 18 January 19
Nice project@Duke: do you think it can be used in association with the M4 in order to debug a CPC runing application from the PC ?. The M4 read memory from the CPC and send it to the PC through this interface
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: Duke on 15:19, 18 January 19
Nice project@Duke: do you think it can be used in association with the M4 in order to debug a CPC runing application from the PC ?. The M4 read memory from the CPC and send it to the PC through this interface
Actually the M4 board already has a serial port exposed, its labelled (TX,RX,GND) on the top header, I can enable access to it, if anyone wants to use it.
 Could it or @ikonsgr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=541) serial port be used as link for debugging,  probably yes :)

@ikonsgr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=541) , nice project!
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: remax on 20:24, 18 January 19
Actually the M4 board already has a serial port exposed, its labelled (TX,RX,GND) on the top header, I can enable access to it, if anyone wants to use it.
 Could it or @ikonsgr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=541) serial port be used as link for debugging,  probably yes :)

@ikonsgr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=541) , nice project!


On which one would it be the easiest to have an RS232 port ? I'd love to test one of the wifi modems available (Retro Wifi SI (https://www.simulant.uk/shop/retro-computers-games-consoles/amstrad-cpc/retro-vintage-computer-wifi-modem-rs232-serial-hayes-compatible) or Wifi232 (http://biosrhythm.com/?page_id=1453))

(or perhaps one or both make those wifi modems not necessary ?)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 22:22, 18 January 19


On which one would it be the easiest to have an RS232 port ? I'd love to test one of the wifi modems available (Retro Wifi SI (https://www.simulant.uk/shop/retro-computers-games-consoles/amstrad-cpc/retro-vintage-computer-wifi-modem-rs232-serial-hayes-compatible) or Wifi232 (http://biosrhythm.com/?page_id=1453))
(or perhaps one or both make those wifi modems not necessary ?)

Well, as far as my serial interface is concerned, legacy devices that require "full feature" RS232 port with all extra signals like DTR, DSR, RTS etc are not supported.
But as you already said, you don't actually need any kind of these modems anymore,since you can connect directly to internet using the Wifi module, either with M4 board or serial interface!
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: GUNHED on 01:03, 19 January 19
Actually the M4 board already has a serial port exposed, its labelled (TX,RX,GND) on the top header, I can enable access to it, if anyone wants to use it.
Yes, please, so we can connect.  :)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: VincentGR on 01:59, 19 January 19
What gunhed said  ;D
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: Audronic on 02:18, 19 January 19
@ikonsgr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=541)



Please see a PM from me


thanks Ray
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: Etegar on 14:37, 27 January 19
Hi,


Thanks John, board received and tested this weekend with my usb2serial cable.  All your aplications are working fine  !!!!
I,m surprised especially with the transfer speed time (set at 115200 for default). It takes really few seconds in transferring a file from PC to CPC (directly to the 3” Disk). I supose that wifi conected modules will do the same quickly job as the usb2serial cable.
When the dsk transfer utility will be finished this really will save time and inconveniences with another  hardware solutions.
You have done a great job and this board. Please go on with this project.


Eduard

Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 02:18, 28 January 19
Thanks Eduard, and if you set speed, up to 576000 using a usb2 serial cable, it's even faster!  :)
I will surely add dsk image transfer support in the future, but currently i'm  working on,IMO, an even more interesting project:
 direct load and run of programs from PC, with blazing fast speeds of ~twice the actual disk loading speed! (for example, load and run of a single 42kb binary game takes  ~4seconds!!!)
I use a similar procedure with the "Cold start" function, you only need to type a small basic program (to enable the transfer of the assembly routine from PC to Amstrad), and then using redirections of firmware's loading routines (e.g. some pokes), you can use the very same BASIC  commands, RUN"" and LOAD"", to directly load and execute programs from PC!  :)

I've already manage to use it for load and execute of BASIC programs and single Binary files, and now i'm working the direct execution of games with multiple files (which proved much more difficult thing to do...) . I believe i'll have it ready soon for anyone to use it. And it would be very interesting to see if it will work on a CPC 464 too, thus, providing a cheap,easy and super fast solution of loading games and programs on the "Cassette only" 464!
It would be the revenge of the CPC 464, loading games, twice as fast as a CPC 6128 with disks!  ;)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: HAL 6128 on 08:52, 28 January 19
... you only need to type a small basic program (to enable the transfer of the assembly routine from PC to Amstrad), and then using redirections of firmware's loading routines (e.g. some pokes), you can use the very same BASIC  commands, RUN"" and LOAD"", to directly load and execute programs from PC...
...how about creating a ROM which brings the CPC after booting in some kind of "listening" mode? Maybe also interesting for cross-compiling?
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 15:41, 28 January 19
Well, that would require to replace the hole Amsdos ROM with a custom one (like duke have done), which probably is something very hard and time consuming thing to do.
Also, in order to use a ROM for amstrad to read from it, the circuit  must implement full 16bit address decoding and most probable "on the fly" reading! That would require a much bigger PIC (possibly with 40pins) and far more complicated circuit...  ::)


Title: Re: Universal Serial Interface for Amstrad CPC
Post by: GUNHED on 18:40, 31 January 19
What do you mean with 16 Bit address? Doesn't it decode the 16 bit I/O completely? If yes, which are the shaddow ports?

Title: Re: Universal Serial Interface for Amstrad CPC
Post by: GUNHED on 18:54, 31 January 19
...for example, load and run of a single 42 kb binary game takes  ~4 seconds!!!
Using FutureOS it takes about 2,7 seconds  ;D  But I'm sure the serial interface can do even better!  :)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: LambdaMikel on 17:32, 01 February 19
Damn! Can't wait to get my serial board....  :D
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 19:51, 01 February 19
What do you mean with 16 Bit address? Doesn't it decode the 16 bit I/O completely? If yes, which are the shaddow ports?

Nope, just 2 address bit needed A5 and A10 (and the A0 which used for having data & control port). Of course the address bit selection was not random,but it's based on Amstrad's I/O port allocation:
http://www.cpctech.org.uk/docs/iopord.html
If you take a look there, you will see that, A10=0 defines I/O peripherals, and A5=0 a serial port. These 2 address bits, are combined with M1 and I/O request signals (when IORQ=0 and M1=1 means exclusively Input/Output request) to enable interface exclusively on ports &FBD0-FBDF! ;-)  And that way, i was able to implement address decoding using a small and cheap logic gate chip!  ;)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: GUNHED on 14:17, 03 February 19
Then ports &FBDE and &FBDF should be used (instead of &FBD0/1)  :)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 10:35, 05 February 19
I suppose so, but this is true for any device. The CPC IN/OUT design uses 16 bits address instead of the "traditional" 8 bits. These I/O addresses,according to port allocation document,  are not fully decoded, thus a hardware device can be accessed through, with more than one address!  ;)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: GUNHED on 21:32, 06 February 19
Exactly!  :)  Therefore the more bits we set to "1", the less interference we have. Actually some other expansions I have to check, if the I/O port can in a more "compatible" way can be addressed. Because nowadays lots of users have lot's of stuff on their CPCs / Plus.  :)


But back to the USIfAC (Universal Serial Interface for Amstrad CPC): I'm looking forward to work with it. In two weeks I start to have more time for computers again and the handling of the USIfAC can't be more easy.  :) :) :)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: GUNHED on 04:06, 24 February 19
Received my five cards, now it's time to get some CPCs networked!  ;D ;D ;D


Thank you very much, the quality is great too!  :) :) :)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: LambdaMikel on 05:52, 24 February 19
Received my five cards, now it's time to get some CPCs networked!  ;D ;D ;D


Thank you very much, the quality is great too!  :) :) :)
My 2 also arrived, and great quality as well - didn't have a chance to test them yet though.
Thanks @ikonsgr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=541) !!  :)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 12:19, 24 February 19
That's great guys, i hope you will be able to make a good use of the serial interface!  ;)

Now,i'm happy to announce a MAJOR update:

- Add a new function for DIRECT load from PC,of many games/programs and with SUPER FAST speeds (~twice the speed of a disk drive or gotek/hxc emulator!)
- As i ordered bigger batches for pcb's and PICs, now i can offer ready made boards and DIY kits even cheaper!
- Update manual, programs etc.


First i want to thank Docent for his help  (http://www.cpcwiki.eu/forum/programming/mc-startboot-program-without-reseting-firmware-jumpblock/msg170920/#msg170920) on developing the code  for the direct load function.
The direct load function is actually a major upgrade of the "Cold start" function i developed earlier. With this, you will be able to load or run a program (either BASIC or  BINARY) and also many games, directly from the PC! The hole Procedure is rather easy and fast: First, run the windows application and set function to “Direct Load” (com speed will be automatically set to 115200). As with the "cold start" function, a small  BASIC program is required to be typed on the CPC, but now it's much smaller:

10 OUT &FBD1,0:OUT &FBD0,0:DI
20 FOR I=0 TO 341
30 POKE &A9B0+I,INP(&FBD0)
40 NEXT i
50 CALL &A9B0
 


Run the program, and after a couple of seconds, you will get the “Ready” prompt.
 From now on, any LOAD” or  RUN” command you will give, it will be  redirected to PC! Using the button “Direct Load Dir”, you can set the loading directory and have a list of all available files in it:

 

* windowsprogram1.jpg
(79.77 kB, 762x530 - viewed 295 times)


By setting loading directory to Amstrad Utility Disk folder, you can direct execute utilities WITHOUT needing first to transfer the utility disk image to a real disk (or to a usb stick if you have a gotek/hxc drive)!For example, you can simply give:

 RUN”Format.BAS” ,  in order to format a CPC disk, or

 RUN”PC2CPC.BAS”, for transferring files from PC to Amstrad disks

  After thorough testing, it is concluded that ~75% of games can be directly executed using this method! You can find many dozens of games that already tested here. (https://www.dropbox.com/sh/hzp3a4b7fktcn8c/AAAj2U8otKw26j-chnd8uUxla?dl=0)
And because this method requires to have files extracted from dsk images, i have also included the “cpc loader” utility, for easily extract multiple dsk images instantly!
For more details you can check User's guide too.

Now, the new function is tested with my CPC 6128, but it would be very interesting to see if it works with the "cassette only" 464, as it would provide a very easy and cheap solution for very fast loading of many games for CPC 464!
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: VincentGR on 13:13, 24 February 19
Received my five cards, now it's time to get some CPCs networked!  ;D ;D ;D


Thank you very much, the quality is great too!  :) :) :)


Waiting for a video with that  ;D
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: GUNHED on 14:42, 24 February 19
This will take some time. Meanwhile let me ask some (stupid) questions, but this may be of common interest. So I prefer to ask here instead of writing tons of PMs.

The manual is great, but I want to be sure not to screw things up. From the old days I'm familiar with RS232 / RS485, but this is modern technology...

First question: To connect two CPCs using wires, what do I need to do?
Just connect Tx from the first card with the Rx from the second. And Rx from the first card with Tx from the second. Right?
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: Patrick on 14:45, 24 February 19
It sounds good for me but add also ground.
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 15:03, 24 February 19
The manual is great, but I want to be sure not to screw things up. From the old days I'm familiar with RS232 / RS485, but this is modern technology...
I've updated manual with even more details and information. Now there are BASIC and Assembly code examples for send and receive data and a hole new section describing the usage of the direct load function.

First question: To connect two CPCs using wires, what do I need to do?
Just connect Tx from the first card with the Rx from the second. And Rx from the first card with Tx from the second. Right?

 Well,i never tried this, but i believe you will also need the ground pin too (to establish a common ground level for the signals), as in case of direct serial connection of amstrad with CPC using a usb2serial cable adapter. In any case, when you use any kind of direct serial cables, NEVER use the 5v power supply pin, this is only needed for powering the various modules like bluetooth, wifi, usb host etc.
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: GUNHED on 15:18, 24 February 19
Well,i never tried this, but i believe you will also need the ground pin too (to establish a common ground level for the signals), as in case of direct serial connection of amstrad with CPC using a usb2serial cable adapter. In any case, when you use any kind of direct serial cables, NEVER use the 5v power supply pin, this is only needed for powering the various modules like bluetooth, wifi, usb host etc.
Ok, so I will try this:

GND --- GND
Tx    --- Rx
Rx    --- Tx

Ordered cables for BT-modules and a BT module, which shall be able to connect to my Laptop which has BT inbuilt. As long I wait for the order to arrive I try that direct connection.  :)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: Patrick on 16:12, 24 February 19
Another thing to consider is the length of the wires. Avoid using too long wires. TTL is not RS232.
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: Audronic on 01:24, 25 February 19
@ikonsgr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=541)


Is there a link to the Support files please.
I have not been able to find them.


Thanks.  Ray
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 01:46, 25 February 19
https://www.dropbox.com/s/0z2cpcbxvl95s9v/Amstrad%20CPC%20serial%20interface.zip?dl=0

You can find it on the first post of this thread too.
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: Audronic on 04:16, 25 February 19
@ikonsgr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=541)


Thanks.
Would it be possible to add that link into the first Message Please. (Perhaps at the bottom of the Page) ? ?


Thanks  Ray
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 11:09, 25 February 19
The link was  already in the 1st message, but now i also changed the color to red to easily spotted by anyone
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: Audronic on 11:15, 25 February 19
Thanks


Ray
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: JonB on 09:53, 26 February 19
I'm a bit late to the party on this one, but tell me, is this serial interface also supported by CP/M Plus (6128)?
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ComSoft6128 on 10:01, 26 February 19
Good question.


As far as I'm aware it is an Amsdos only program at the moment but @ikonsgr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=541) will no doubt answer it definitively later.


Cheers,


Peter
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 18:35, 26 February 19
I'm a bit late to the party on this one, but tell me, is this serial interface also supported by CP/M Plus (6128)?

 Unfortunately i don't know much about CP/M so for the moment, there is no CP/M program that supports this interface.
But since usage is pretty easy even with Assembly code, maybe someone might want to develop a utility for CP/M plus too...  :)
Title: Re: Universal Serial Interface for Amstrad CPC
Post by: JonB on 08:22, 27 February 19
It's not in need of a specific CP/M utility program, the question is whether or not CP/M supports it already. I consider that very unlikely (it depends on which I/O addresses your interface uses and the UART it uses) but thought I'd ask anyway. Maybe someone has tried it?
Title: USIfAC: Universal Serial Interface for Amstrad CPC - Support for FutureOS
Post by: GUNHED on 21:17, 27 February 19
With the next update of FutureOS there will be support for the USIfAC board. Software will follow in time.  :) :) :)


EDIT: For the actual version, you can use the ConfigOS utility and activate the USIfAC too, so no need for an update. If I manage to release some software it will be fine too (just adding some automatic detection).

Title: Re: Universal Serial Interface for Amstrad CPC
Post by: ikonsgr on 00:12, 28 February 19
It's not in need of a specific CP/M utility program, the question is whether or not CP/M supports it already. I consider that very unlikely (it depends on which I/O addresses your interface uses and the UART it uses) but thought I'd ask anyway. Maybe someone has tried it?
Well, only 2 addresses used: &FBD0,&FBD1 (although interface answers to the hole range of &FBD0-&FBDF)
This might be useful too: http://www.cpctech.org.uk/docs/iopord.html
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: GUNHED on 11:50, 01 March 19
Now I guess I need some help. Since I'm not so familiar with Bluetooth.

- At CPC-side I connected the USIfAC and to this a Bluetooth module (without button). I used the same module before with the Mini-Booster, so I know the module works.
- From the Disc I started the "Terminal" Application.

- At PC side I did start the "AmstradUtility.exe" application.
- I switched to Wi-Fi. Then clicked at connect.
- The PC / Laptop has an internal Bluetooth module

However I could not get any connection (115.000 baud and also tried 9600 baud, at both sides).


Is there a simple step-by-step idot-proof way to go?

Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: Audronic on 12:45, 01 March 19
@GUNHED (http://www.cpcwiki.eu/forum/index.php?action=profile;u=2029)


? are WI Fi and Bluetooth different devices ?


Ray
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 13:14, 01 March 19
Now I guess I need some help. Since I'm not so familiar with Bluetooth.

- At CPC-side I connected the USIfAC and to this a Bluetooth module (without button). I used the same module before with the Mini-Booster, so I know the module works.
- From the Disc I started the "Terminal" Application.

- At PC side I did start the "AmstradUtility.exe" application.
- I switched to Wi-Fi. Then clicked at connect.
- The PC / Laptop has an internal Bluetooth module

However I could not get any connection (115.000 baud and also tried 9600 baud, at both sides).


Is there a simple step-by-step idot-proof way to go?

bluetooth modules are actually serial devices, so you use 'Serial connection' not Wifi.
Also, i note on User's guide, the Tx and Rx signals does not need swap (i have swapped labels for easier connection as some people might not know a swap is needed) , so you should  connect pin Tx to Tx and Rx to Rx.  :)
About wifi modules, you should first run setwifi.bas in order to setup you wifi module, check user's guide fore more details! And ofcourse you should set Wifi module's ip on windows program too.
If everything works ok, the connection should be established almost imediately after pressing 'Connect' button. If there is a small delay of a few seconds, it means that connection is established but web server on wifi module is not up and running. If there is a longer delay (~20 secs) it means that wifi module is not connected to access point of your router
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 13:20, 01 March 19
@GUNHED (http://www.cpcwiki.eu/forum/index.php?action=profile;u=2029)


? are WI Fi and Bluetooth different devices ?

Ray

There is absolutely no relationship between bluetooth and wiFi.
Bluetooth is just a wireless point to point serial protocol just like Uart, rs232 etc, only it's wireless.
WiFi is actually a wireless Ethernet protocol, it's like connecting your device using ethernet cable only it's wireless.

Wifi module is something much more complex and 'heavy' than bluetooth  so IMO , for direct wireless connections, better option should be bluetooth.
 Wifi on the other hand, is useful for other things:
- The abilitiy to create a LAN
- offers a direct connection to internet
Hope this clears things up a bit.

There is also something else about wifi usage,it needs some "packet decoding" at amstrad's side for send or receive, as the data stream is encapsulated with a header, which needs to be removed. For example to send a string using wifi you must first send to serial port the command:
AT+CIPSEND=0,X
where X is the length of the string to be sent. Data string follows imediately after.

serial connections on the other hand, like bluetooth, are straight forward , you just send a byte directly and the other side received it as it is! Thus blutooth is easier to implement and takes less process (and for that it's a bit faster too).


Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 20:47, 01 March 19
I've just updated the User's guide, i've added detailed sections about sending/receiving bytes using serial/Bluetooth modules AND WiFi module, including an example BASIC routine for sending bytes using WiFi module! Also, added some more details and troubleshooting on the "Configure ESP8266 WiFi Module" section too.
So, GUNHED i believe now you can find everything you might need for writing your own utlities/programs/games  that will exploit all USIfAC possibilities!  ;)

Btw, in the weekend i will start dsk image transfer trials...   ::)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: Colday on 21:20, 01 March 19
Hey.


I've built and connected my board to my 6128 (and a 464 but we will come back to that).


When I run the little basic program for direct load connection all it does is resets the Amstrad. (after a couple of seconds)


Anyone any idea what I'm doing wrong?


I've PM'd Ikon with the same question but thought it may be useful here in case anyone is having similar issues.


464 - Well, it basically did exactly the same, just reset the CPC after running the Direct Loader program.


Ideas anyone?
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 21:37, 01 March 19
The "problem" about using a serial port with DB9 or DB25 ,like those on older PC motherboards, is a major difference in voltage levels comparing to UART's  TTL level.
Serial interface works at 0-5v, where 0=low and 5v=high, where serial ports goes from negative 3-25volts for High, to +3-25volts for low!
Fortunately there are ready made RS232 to TTL level converters which are very cheap too:
https://www.ebay.ie/itm/RS232-To-TTL-Converter-Module-COM-Serial-Board-MAX232CSE-Transfer-Chip-atmega16/153166180732?hash=item23a96a717c:g:QEgAAOSw3JRbjjpZ:rk:2:pf:0
This is to use it with a classic DB9 serial port, and this:
https://www.ebay.ie/itm/3X-Mini-RS232-to-TTL-Converter-Module-Board-H1V9/283193772210?hash=item41efaa08b2:g:jKYAAOSwRNhbtbLU:rk:1:pf:0
can be used if you only have a serial port pin header on your PC motherboard.
I believe the above adapters would allow an RS232 serial port to work with USIfAC too.

Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: Dandare on 23:48, 02 March 19
There is absolutely no relationship between bluetooth and wiFi.
I concur... for the most part  :D  Bluetooth uses some of the radio spectrum of WIFI.


Bluetooth is just a wireless point to point serial protocol just like Uart, rs232 etc, only it's wireless.
WiFi is actually a wireless Ethernet protocol, it's like connecting your device using ethernet cable only it's wireless.


While most of the uController friendly Bluetooth modules do implement the serial profile, Bluetooth Stack is not only serial, it has different profiles. In fact, bluetooth allows for several simultaneous connections and allows different profiles to be used concurrently.


Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 01:13, 03 March 19
While most of the uController friendly Bluetooth modules do implement the serial profile, Bluetooth Stack is not only serial, it has different profiles. In fact, bluetooth allows for several simultaneous connections and allows different profiles to be used concurrently.

Indeed, bluetooth ,although it's a serial point to point protocol, it's also based on master/slave model, so a number of bt slave modules can connect simultaneously to a master bt module, thus you might be able to create a CPC LAN even using BT modules!  :)
Still, Bluetooth stack has nothing to do with the much more "heavy" and complicated WiFi's TCP/IP stack (thus WiFi modules use powerful 32bit RISC CPUs) ...  ::)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: GUNHED on 20:12, 04 March 19
When switching the serial interface port (COM1...7) then more often (COM 1-4) the PC program tells "Serial interface error!". Then the PC program ends. It's a bit nasty to restart it all the time for every single try.

With the PC program (terminal) I can not enter a single letter, it always makes an acustic warning.

Also with COM 7 at least with the CPC terminal program I can send "Hello" and as response I get "heo" or "elo" back.

The manual ist better, but it lacks step-by-step explanations. Did anybody use a Laptop Bluetooth device for transfer? Or do I need to connect a Bluetooth to the PC via a USB cable?
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 21:04, 04 March 19
GUNHED, the problems you describe can be caused:

1) If you switch  serial port while it is CONNECTED, you have to disconnect serial port by pressing the "CONNECTED" button before make any switches!

2) You are trying to use an RS232 serial port (usually on board serial ports on motherboards). As  already mentioned (http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/universal-serial-interface-for-amstrad-cpc/msg171295/#msg171295), the classic RS232 serial ports are NOT combatible as they  use completely different voltage levels for "high" and "low" compared to the TTL levels of PIC's UART interface. But fortunately there are very cheap adapters for this too.

3) Ensure that serial speeds are matching! Default serial speed of the Usifac is 115200, so make sure the other side is set to the same speed, or change to the desired speeds using terminal (for the usifac) and port speed drop box on windows program.

Finally i should note that enumaration of serial ports is done once when program started. If you connect a UB2SERIAL cable adapter (or enable a serial port) AFTER you have run the program, it will not be recognized (i might add a "refresh ports" button for this,in order to avoid need for restart program)!

Hope these will help
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 00:24, 06 March 19
I've just transfer the dsk image of Double dragon 3 to a 3" disk in....40Seconds!
Coming soon to your near USIfAC!  :D
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: GUNHED on 18:35, 06 March 19
I've just transfer the dsk image of Double dragon 3 to a 3" disk in....40Seconds!
Coming soon to your near USIfAC!  :D


Can you please tell us step by step how you did it? So we can reproduce.  :)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 23:27, 06 March 19
Don't worry, in a few days i'll upload the updated program along with the utility on amstrad cpc and update the manual of course.
But here is a small preview:

 

* new_prg.jpg
(80.14 kB, 766x548 - viewed 299 times)


It's a rather simple procedure, you just  select the "Image Copy to CPC" function, and using "Select Image" button, you choose the dsk image you want to transfer.
 Then, you just run the utility on amstrad CPC, a :"Insert a disk and press any key" message appears,you insert an empty disk, press a key, and after ~40seconds you will have your disk ready!
The program will also notify you what kind of disk format is needed (disks must be either data/system/ibm formatted), you can use the format utility inside Utility disk for this, it's actually  really fast too, formating a disk takes ~15 seconds! 
Of course since i use AMSDOS routines for the transfer, images with more than 40 tracks or strange sectors (e.g. usually copy protected games), might not  be copied to disk correctly. For these, program tries to cut  all the non AMSDOS track/sectors (these cannot be written on disk anyway, you get a "Disk error,Ignore or cancel" message on each attempt of writing a "curious" sector) and writes all other. In a couple of cases, an image with 41-42 tracks, copied succesfully to disk, by just discarding the extra tracks, so although it's a "long shot", i decided not to prohibit the transfer of copy protected images but rather leave this option just in case it might work... Still, i will try to develop a way for copying copy protected images, maybe by utilizing this (http://www.cpcwiki.eu/index.php/Programming:Formatting_a_track_on_a_disc) track format routine by thaker, if it can be used for non standard track/sectors of course. The other "solution" might be to edit directly the extended disk parameter block, EDPB, at &A890 but i might need some help on this  ::)

Also, i've  added a "Rescan" button, for refreshing the available Serial ports without needing to restart the application.

One other thing that worth mentioning, is that the actual transfer speed you get, depends heavily on the layout of sectors in a track.
 After copying a few dozens images to disks, i noticed that most of the standard dsk images, have a sector layout on each track that results in requiring ~double the transfer time to disk (~80 seconds). These images have sector id's in series order e.g.: C1, C2, C3... C9 (these are the most common sector id's for DATA format disks).
 On the othe hand, most of extended dsk images use a different layout (kind of "interleave" order: C1,C6,C2,C7,C3,C8,C4,C9,C5) that allows the admittedly very fast transfer of ~40seconds/dsk image! So, i manage to rearrange "on the fly" the order of the sectors of a "slow" image, to match this of the "fast" image, and so now, all games can be written  fast!  :D

Next thing follows, is adding a patched "READ SECTOR" routine for the direct load function! If all goes well, you'll might be able to run CPM games (that needed |CPM to run) and games that used a small "disc" file header without individual files, which currently not supported by the direct load! And the funny thing is that maybe even  some copy protected games that can't be transferred to disk , might run directly using this method!  :)

Keep in touch!
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 13:11, 07 March 19
After a little talk with my good assistant Docent,  :)  ,he suggests that i could format a track "on the fly" ,before writing sectors, thus enabling an image transfer WITHOUT needing for the disk to be pre-formated! (and hopefully will enable to write copy protected images with "Strange" track/sectors too).
As i believe this would offer much greater convinience, i've decided to postpone a little the presentation of the dsk image transfer, in order to develop this enhancement.

Stay tuned!  :)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: Dandare on 13:50, 07 March 19
As a related USB project, I just uploaded a demo of the upcoming game transfer by USB on a Dandanator CPC. It loads and run a game from the PC to the real CPC in about 6 seconds.


Check the post here: Re: CPC Dandanator Mini 1.3 - WIP (http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/cpc-dandanator-mini-1-0-wip/msg171579/#msg171579)

@ikonsgr, Adapting your current Disk transfer software to run from a dandanator CPC is something we can look into if you want :D
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: GUNHED on 15:17, 07 March 19
Since I had no luck to connect the USIfAC to a Laptop using Bluetooth my next attempt was to connect the USIfAC to the PC using a cable, which goes into one USB port. The same cable works flawless with the Mini-Booster. The PC software did fix me to COM6, I couldn't change it. The speed was 9600 baud (both of course). I tried the terminal program, no success at all.
The next and last attempt will be to connect two interfaces from CPC to CPC directly. Hopefully it will work, just need to get some appropriate wire.


Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 15:40, 07 March 19
Since I had no luck to connect the USIfAC to a Laptop using Bluetooth ..
On the other hand, i was able to chat with a lenovo tablet and my old LG smartphone using bluetooth...  ;D 
In most cases, if you are unable to connect with a device that has a build in bluetooth, this caused by wrong role setting (master/slave) of the bt module on amstrad. Check the bluetooth section on my user guide, to see how you can change that (it's only a single AT command: AT+ROLE=1 or 0...)

my next attempt was to connect the USIfAC to the PC using a cable, which goes into one USB port. The same cable works flawless with the Mini-Booster. The PC software did fix me to COM6, I couldn't change it. The speed was 9600 baud (both of course). I tried the terminal program, no success at all.
If we are talking about the usual cheap prolific usb2serial adapter cable, then 100% it should work directly! Did you try my terminal program to see if the port is recognized correctly?  In any case this "fix to com6, I couldn't change it"  doesn't sound very good... ::)

Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 15:52, 07 March 19
As a related USB project, I just uploaded a demo of the upcoming game transfer by USB on a Dandanator CPC. It loads and run a game from the PC to the real CPC in about 6 seconds.
Check the post here: Re: CPC Dandanator Mini 1.3 - WIP (http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/cpc-dandanator-mini-1-0-wip/msg171579/#msg171579)
Well that is expected, if i'm not mistaken, the "loading" using Dandanator it's merely a direct memory transfer between your device ram and amstrad's ram (or something like that)...  ;D
If i may ask, is dandanator a DIY free project?  And what is the actual cost of making one or having one from you?
I believe these are critical factors for a project to be REALLY useful and widely accepted,don't you think?

@ikonsgr, Adapting your current Disk transfer software to run from a dandanator CPC is something we can look into if you want :D
Well, all source code and binaries are given freely (check 1st post on this thread) for anyone who wants to  modify,edit, change etc, to make their own applications. If there is anything else you might want to know fell free to ask!  :)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: GUNHED on 16:06, 07 March 19
In most cases, if you are unable to connect with a device that has a build in bluetooth, this caused by wrong role setting (master/slave) of the bt module on amstrad. Check the bluetooth section on my user guide, to see how you can change that (it's only a single AT command: AT+ROLE=1 or 0...)


Would be nice if you could put this in your software, I didn't know about it. Also I don't know how to find the CPCs Bluetooth-Module. But I do find the one of the Mini-Booster. I nevertheless take a break, it's quit frustrating.
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 16:11, 07 March 19
All the informations one might need to use a BT module with Usifac, can be found in the user's guide bluetooth section (it's only a single page after all...)!
There you can find a recomendation of what BT modules to use, and where to find/buy them ,along wiith photos, and a step by step precedure (like you wanted  :) ),to configure the modules! 
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: Dandare on 16:15, 07 March 19
Well that is expected, the "loading" using Dandanator it's merely a direct memory transfer between your device ram and amstrad's ram...  ;D
If i may ask, is dandanator a DIY free project?  And what is the actual cost of making one or having one from you?
I believe these are critical factors for a project to be REALLY useful and widely accepted,don't you think?
Well, all source code and binaries are given freely (check 1st post on this thread) for anyone who wants to  modify,edit, change etc, to make their own applications. If there is anything else you might want to know fell free to ask!  :)


The CPC Dandanator has no ram :) , so what you have seen is quite tricky. The game loads from the PC via USB to the CPC Ram directly by means of hardware hacking an opcode. When activated, LD A,(HL) does not loads a with the content of the address pointed by HL, but returns the bit of the serial port. Then a Z80 asm bitbanging at 115.200bps does the rest. When loading a game you have to restore the registers, CRTC, GA.... so that has to be done as well.


CPC Dandanator is public domain since its first appearance on September last year. It's a brother project of the ZX Dandanator, launched in 2016. There are 382 cartridges on the field right now (ZX Dandanator numbers are way over 2.000 units).


BOM for materials is around 8€ without the plastic case. All information is in www.dandare.es (http://www.dandare.es).


I'd check your code in the first post, thanks.




Edit: I did post the source code for the ZX Dandanator PIC, the VHDL Source Code for the CPC Dandanator CPLD, Z80 source code for ZX (CPC coming when cleaned ;) and all the sources of the Java tool in GitHub. Are you planning to post your source code? Thanks.


For what I've seen there is a list of games you support. Is this a manual process?. I'm approaching this by Snapshots, so any game snapshot, CDT or DSK-"beta" (I have an embedded CPC emulator in the Java Tool) with no modification is supported (I'm quite positive some of them may fail in this v1, though)


Also, you may want to consider integrating the USB to TTL in your pcb as I did with the CPC Dandanator, so you just plug a cable between the PC and the board. I used an external USB-TTL adapter for the ZX Dandanator but, in my opinion, having the USB connector in the cartridge is a much better user experience and cost is not to high.
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 16:37, 07 March 19
That sounds really hard thing to do, indeed. It's definetely a good alternative for fast and easy loading on spectrum zx and amstrad cpc 464 users.
But if i may say, Usifac has nothing to do with dandanator, as it's not just a "loading device" for amstrad (this is just one of the possible usages) , but rather it's a very cheap (either to buy or make yourself) serial interface implemented with a PIC mcu,  which means that usage could be VERY versatile, it can be used to connect and communicate with anything with a UART serial interface, from direct serial cables ,bluetooth modules, wifi modules even usb host adapters and who know what else!  ;)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: Dandare on 16:42, 07 March 19
That sounds really hard thing to do, indeed. It's definetely a good alternative for fast and easy loading on spectrum zx and amstrad cpc 464 users.
But if i may say, Usifac has nothing to do with dandanator, as it's not just a "loading device" for amstrad (this is just one of the possible usages) , but rather it's a very cheap (either to buy or make yourself) serial interface implemented with a PIC mcu,  which means that usage could be VERY versatile, it can be used to connect and communicate with anything with a UART serial interface, from direct serial cables ,bluetooth modules, wifi modules even usb host adapters and who know what else!  ;)


Absolutely, I just linked here the USB load since both projects kind of share that aspect. Dandanator is a game cartridge (both CPC464 and 6128, and the likes.. 664, KC Compact, Plus series..) that happens to have a USB. Yours is a SERIAL interface (and much better at that, of course) for CPC, I get it :D .

Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 20:31, 07 March 19
BOM for materials is around 8€ without the plastic case. All information is in www.dandare.es (http://www.dandare.es).
That's really cheap indeed. Having said that, i'd like to note some things concerning the "DIY aspect" of various hardware projects:

- A major "problem"  is the PCB board, as even if you share the gerber files, i doubt someone would order the minimum of 5pcbs batch to a chinese PCB maker ,to make just one board, unless it can make the pcb by himself, which i believe, it's NOT the case for the vast majority of amstrad users!  :) 

-  Another matter for a potential DIY, is the need for programming/flashing of CPLD's, MCU's, EEPROM's etc which usually require extra hardware/software.

- The level of complexity of the circuit itself might be a major factor, as larger boards with a lot of components  (especially if there are SMD's), might require greater soldering skills and equipment

All the above greatly influence the REAL potential for DIY, regardless of the cost. So, my first priority when i started the design of the serial interface, was to make it as cheap, as simple and as easy to make/use as it can be! That way, the... "hardware aspect" of the project, was minimized to a minature pcb of ~5X3cm with very few components, and all the potential usage is made by software!  ;)
 

Edit: I did post the source code for the ZX Dandanator PIC, the VHDL Source Code for the CPC Dandanator CPLD, Z80 source code for ZX (CPC coming when cleaned ;) and all the sources of the Java tool in GitHub. Are you planning to post your source code? Thanks.
  That's really an admirable job you did, perhaps compared only with "M4", the other "super board" made by duke, really much more adavance projects than my serial interface... ::)

For what I've seen there is a list of games you support. Is this a manual process?. I'm approaching this by Snapshots, so any game snapshot, CDT or DSK-"beta" (I have an embedded CPC emulator in the Java Tool) with no modification is supported (I'm quite positive some of them may fail in this v1, though)

 In 2 words, in my case everything is made by software. I just patched the firmware loading routines thus all "RUN" and "LOAD" commands referred to a directory in your pc.
You can see all the details about the "direct load" project that utlizes the serial interface (along with a lot of Z80 asm code), here (http://www.cpcwiki.eu/forum/programming/mc-startboot-program-without-reseting-firmware-jumpblock/).


Also, you may want to consider integrating the USB to TTL in your pcb as I did with the CPC Dandanator, so you just plug a cable between the PC and the board. I used an external USB-TTL adapter for the ZX Dandanator but, in my opinion, having the USB connector in the cartridge is a much better user experience and cost is not to high.

 Well,as i previously said, i'd like to keep the hardware apsect of the project as cheap and easy to make as it can be, and since usb2serial cable adapters, bluetooth modules and wifi modules are very cheap and easy to obtain,i  considered better let the potential user to choose!  ;)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: 00WReX on 09:40, 09 March 19
OK,so today I finally got out a CPC464 to have a play with the serial interface (had it for weeks but not touched it).

Anyway, feeling like this would all be very straight forward as I have played around with this type of thing on many occasions...I hit a very unexpected roadblock.

So, my problem is I cannot get the Windows utility to recognise a COM port ???

I have multiple USB to serial devices, with the FTDI chipset being the main ones I use (for re-flashing GOTEK software amongst other things).
I even have one like the one pictured in the user guide, I usually use that on the Atri XL's for a SIO2PC solution, so I know they all work.

I Tried different ports, different USB to serial devices, rebooted the computer...nothing.
I always plug the USB to serial device in before starting the software so that the port gets allocated first...but absolutely no joy.

Attached is a screenshot of my PC (Windows 7).

 

* scrnshot_usb_serial.jpg
(218.53 kB, 1366x768 - viewed 206 times)

Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ComSoft6128 on 10:15, 09 March 19
I have exactly the same problem and have tried the interface on two different Windows 8 laptops. A Windows problem? Windows 10 required?
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: 00WReX on 13:21, 09 March 19
A little update...

I have an old laptop running Windows XP, so with nothing to lose I tried that.
Well, as far as serial port connection goes (via the windows utility program) it connected...
It immediately had the COM port in the 'Port' drop down window and connected as soon as I pressed the 'Disconnected' button.
My Windows 7 laptop never sees a port in the drop down window.

But that is about as much success as I have had.

I thought I would have a go at the direct load function using the simple 'type-in' provided in the manual.
But the CPC just locks up.

I had the USB to Serial adapter going the the CPC adapter in the rx to tx and tx to rx  configuration as you would expect.
If I do reverse these, and run the same 'type-in', then I actually get a 'Serial error' message from the Windows utility...so there is something going on between them.

I'm using a 464, so unsure if things have been tested on this model.

Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: 00WReX on 14:12, 09 March 19
Sorry...another quick update.

Quote
I had the USB to Serial adapter going the the CPC adapter in the rx to tx and tx to rx  configuration as you would expect.
If I do reverse these, and run the same 'type-in', then I actually get a 'Serial error' message from the Windows utility...so there is something going on between them.

With the connections going from tx to tx and rx to rx the 'Terminal' program works  ???
Typing on the windows PC appears on the CPC and vice versa.

But the 'direct load' function does not work and causes the 'serial error' as previously mentioned.

OK, that's it for tonight...
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 12:00, 12 March 19
All right,i made some more thorough tests, and it seems that there is a problem with the serial port enumaration code under windows 7/32bit versions only (never thought of that, since it worked fine on windows 7/8/64bit, and windows xp/32bit too...  ::)) .This windows version is most likely what the  laptops you've tried had installed, thus the problem occured.
 I've made some changes to the code, and now it should work ok (i already test it on a windows 7/32bit and worked fine, previous version returned no com ports), so  try this (https://www.dropbox.com/s/6oe3yr2g3so7egc/AmstradUtility.zip?dl=0) and tell me if it works.
Btw, this has the dsk transfer function too enabled, it's still in beta testing but i beleive soon it will be available :D


p.s. Onboard serial ports on old laptops does NOT work directly  as explained eralier (http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/universal-serial-interface-for-amstrad-cpc/msg171295/#msg171295) (also none of these old ports seem to support speeds greater than 115200)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ComSoft6128 on 12:22, 12 March 19
Thank you.
I will try it out this weekend.
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: GUNHED on 17:51, 12 March 19
Connecting a CPC with a CPC using a 3-wire cable works very well. I got my new wires and soldered them together, and the Terminal program works very well. I used:

Tx --- Rx
Rx --- Tx
GND - GND

Next step: Make a CPC network out of them.
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 23:22, 12 March 19
GUNHED, you can also use bluetooth modules instead of direct cables, that way, you can have amstrads in a distance up to 10 meters apart!
For Amstrad LAN, you should use wifi modules, and better try it first using  a router as access point (where all wifi modules should connect to), and if all goes well, then you could try to use one of wifi modules as access point to create a completely "Amstrad only" lan network! 
I'm still waiting for a couple of wifi modules i've ordered to make some tests my self...  ::)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: GUNHED on 23:47, 12 March 19
Well, I tried it, with two HC-06 modules (without button). But they don't communicate. I'm probably the most inexperienced Bluetooth user ever.

In case I enter in one of the terminal windows: AT+ROLE=1 nothing happens. I do a reset of the CPC and start terminal again. Nothing happens. Sorry, I still seem to forget something.

Maybe it's because they are both HC-06?
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 23:55, 12 March 19
BT modules without button, can't enter in administration mode easily, in order to  give AT commands (i think there is a way ,by holding ENABLE pin to ground or something like that) , so you can't change either role or  speed.
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: GUNHED on 00:00, 13 March 19
Ok then I get one HC-05 for one CPC and can use the other HC-06 for the other CPC, right?

Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 00:03, 13 March 19
Yes,i suppose you could do that, but they will only be able to communicate at default speed which is 9600bps.
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: GUNHED on 00:04, 13 March 19
Ok, I'll get _some_ HC-05.  :)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 17:36, 23 March 19
MAJOR UPDATE!

 

* driect2_scr.png
(69.01 kB, 800x553 - viewed 438 times)


- Finally,a dsk image function is added to the utility program! It supports data/system format images and with quite fast speeds: ~55seconds to write a 180kb dsk image to an unformmated disk, or ~40seconds to an already amstrad formatted disk (@460800bps)!

- MAJOR update of user guide: new sections with detailed instructions and help photos for each function were added, along with an active table of contents for easy guide, as manual has become 20+pages!

- Add an extra button <Caps Lock> on Amstrad CPC2PC program,to select/unselect all the files at once! This is useful, if you want to transfer all files of the disk, or if you want to “invert” the already selected files (e.g. all selected files will be unselected, and all other, will be selected).

- Fix a bug which prevented the enumeration of serial ports in Windows vista/7 32bit

- Added a "rescan" button for rescanning serial ports after application is started (in order to avoid close/reopen of application for serial port acknowledge)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 15:49, 24 March 19
Added ~20 more games in direct load games list (games that are tested and verified that work ok with direct load function):
https://www.dropbox.com/sh/hzp3a4b7fktcn8c/AAAj2U8otKw26j-chnd8uUxla?dl=0
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: GUNHED on 18:25, 11 April 19
Just a question for completeness. The USIfAC I guess works with 8N1. Is it possible to change, Parity, Bits/Byte, Stop-Bits ... ?
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: LambdaMikel on 17:34, 12 April 19
Good question.

Any somebody please try the MP3 module test with USIfAC as well (if nobody volounteers, I will try at some point). It worked well with LambdaSpeak 3's serial port.
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: GUNHED on 17:43, 15 April 19
You could connect to LS3 serial port? Did you use 8N1?
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: LambdaMikel on 18:55, 15 April 19
You could connect to LS3 serial port? Did you use 8N1?


Yes, 9600 8N1. You can see how to send play / volume / stop  commands in the video I posted.
I can also share the DSK.


ACtually, the latest LS30.DSK should already have "mp3.bas". I guess it should be easy to adjust for USIfAC.
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: LambdaMikel on 19:05, 15 April 19
Hmm, does not allow to upload DSK... here are screenshots for the MP3.bas


EDIT: note that you only need to send ONE 255... it just because 255 needs to be escaped in LambdaSpeak serial interface.
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 13:40, 22 April 19
Just a question for completeness. The USIfAC I guess works with 8N1. Is it possible to change, Parity, Bits/Byte, Stop-Bits ... ?
   These are not supported by the hardware serial interface on PIC 16F1579.
 

Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: LambdaMikel on 17:17, 22 April 19
   These are not supported by the hardware serial interface on PIC 16F1579.
 
I guess these modi are mostly for exotic and devices of historical interest anyhow... never had anything else than 8N1 anyhow. @GUNHED (http://www.cpcwiki.eu/forum/index.php?action=profile;u=2029) do you know of any devive that's not using 8N1?
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: Dandare on 02:03, 23 April 19
The PIC EUSART supports 9-bit transmission. This bit could be used for data, parity or serve as a second stop bit, but not any two of them at the same time. Calculation of the parity bit should be sent alongside the data byte, by setting TX9D. In the same way, testing for receiving data parity should be done on the RCIF ISR.


Including a second stop bit or even half a stop bit for 1,5 standard value could potentially be done by a timer or delay after the TXIF is set, using the idle status of the line as a stop bit. This is, however, a bit of a stretch of the EUSART.


So, potentially this is what the PIC could do, Note that sometimes the stop bit is done by the hw peripheral itself and sometimes by means of said delay.


9,N,x
8,(Even/Odd),x


But... at the end of the day, almost everything is 8,N,1.  :)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: GUNHED on 02:59, 25 April 19
There _were_ lots of other devices than 8N1 back the day, but today I guess I'm pretty fine with having only functions dealing with 8N1.  :)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: 260Z on 13:51, 27 May 19
This project sounds awesome  :D


Will send a PM


Cheers,
Rob
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: Fabrizio Radica on 23:10, 10 June 19
Hi :)
I've recently bought this module on ebay :)

Can i connect, and use (fm player?), this FM Module on CPC? i've already use it on C64.
https://www.youtube.com/watch?v=FUan3vibg18  (https://www.youtube.com/watch?v=FUan3vibg18)
Ciao!
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: LambdaMikel on 00:10, 11 June 19
Unlikely. That's I2C, not serial / UART.
You could use it with LambdaSpeak 3 instead of RTC board  ;)


This one might do for UART / USIFAC:
https://www.amazon.com/UTP-87-108MHZ-Receiver-Wireless-Microphone/dp/B07FKRML7B/ref=sr_1_6?keywords=stereo+radio+module&qid=1560200987&s=toys-and-games&sr=1-6 (https://www.amazon.com/UTP-87-108MHZ-Receiver-Wireless-Microphone/dp/B07FKRML7B/ref=sr_1_6?keywords=stereo+radio+module&qid=1560200987&s=toys-and-games&sr=1-6)


Or this one:
https://www.amazon.com/UTP-87-108MHz-Wireless-Microphone-Receiver/dp/B07FKR5GYD/ref=sr_1_20?keywords=stereo+radio+module&qid=1560200987&s=toys-and-games&sr=1-20 (https://www.amazon.com/UTP-87-108MHz-Wireless-Microphone-Receiver/dp/B07FKR5GYD/ref=sr_1_20?keywords=stereo+radio+module&qid=1560200987&s=toys-and-games&sr=1-20)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: Fabrizio Radica on 14:23, 11 June 19
Unlikely. That's I2C, not serial / UART.
You could use it with LambdaSpeak 3 instead of RTC board  ;)


This one might do for UART / USIFAC:
https://www.amazon.com/UTP-87-108MHZ-Receiver-Wireless-Microphone/dp/B07FKRML7B/ref=sr_1_6?keywords=stereo+radio+module&qid=1560200987&s=toys-and-games&sr=1-6 (https://www.amazon.com/UTP-87-108MHZ-Receiver-Wireless-Microphone/dp/B07FKRML7B/ref=sr_1_6?keywords=stereo+radio+module&qid=1560200987&s=toys-and-games&sr=1-6)


Or this one:
https://www.amazon.com/UTP-87-108MHz-Wireless-Microphone-Receiver/dp/B07FKR5GYD/ref=sr_1_20?keywords=stereo+radio+module&qid=1560200987&s=toys-and-games&sr=1-20 (https://www.amazon.com/UTP-87-108MHz-Wireless-Microphone-Receiver/dp/B07FKR5GYD/ref=sr_1_20?keywords=stereo+radio+module&qid=1560200987&s=toys-and-games&sr=1-20)
oh.. can i use USIFAC + LambdaSpeak 3 + Mp3 module?
if yes.. i would like to buy LS3, now (how much costs?) :)
Sounds great for my LocomotiveBasic Games like this.

https://www.youtube.com/watch?v=qhCgyKwt6JQ (https://www.youtube.com/watch?v=qhCgyKwt6JQ)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: GUNHED on 14:51, 11 June 19
oh.. can i use USIFAC + LambdaSpeak 3 + Mp3 module?
if yes.. i would like to buy LS3, now (how much costs?) :)
Well, here I run a CPC 6128 with USIfAC and LambdaSpeak III very well.  :)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: LambdaMikel on 20:29, 11 June 19
@Fabrizio Radica (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1837) if you want to buy LS 3 because of the UART Radio, then let's wait a little bit, I also ordered on of these to check them out, so I can give you better support once I got one running.


The prices for LS 3 vary depending on what you want to get - it is configurable. The prices have been posted in the LS 3 thread, please have a look there.


Cheers
Michael
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: 260Z on 13:20, 14 June 19
Howdy @ikonsgr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=541) and all  :)


Received my Serial Interface today , and I'm absolutely loving it. Fantastic piece of hardware.


Before I discuss a couple of quirks , I'll fully disclose the setup I'm running , just in case it's somehow relevant. Plus anyone else running this setup, or similar, should be confident that this will run on their system.


464 -> MotherX4 Board + @revaldinho (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1776) memory expansion 512kb + USIFAC -> Rombo Redux Deluxe board ( numerous roms ) -> DDi-1 with Parados Rom -> x2 FD-1 Drives


Firstly , Direct Load and PC2CPC works perfectly. But the Dsk2Disk utility , I'm assuming this has been programmed for Basic 1.1??? . As line 1015 CLEAR INPUT , upset my lowly 464...lol.  All good though as I simply deleted this line and it appeared to function perfectly.

Edit : Just realised the impact of removing CLEAR INPUT. Will look into the 1.0 equivalent.

Secondly , but much more sadly :( , the windows application refused to recognise the R-Type 128k DSK , saying it wasn't AMSDOS compatible. This is only an assumption , as I don't know for certain , but I'm assuming that R-Type is designed for Parados Formats ?? . If this is the case , is it possible to have support for Parados Formatted disks included ??


The final point is trivial really , as I could probably program this myself into the BAS flle , but an option to select the destination drive ( A or B ) in DSK2DISK and PC2CPC would be nice :)
 
But otherwise I'm loving what you've done here @ikonsgr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=541) . I can write files directly to my disk drives from my PC  :D


Between you, @revaldinho (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1776) and @The Equalizor (http://www.cpcwiki.eu/forum/index.php?action=profile;u=2279) its been a good couple of weeks  ;D


Cheers,
Rob
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 20:43, 21 June 19
Wow, that's fantastic, so direct load is working on 464 after all!  :D
About the "clear input" problem you mentioned, try it to replace it with: CALL &BB03 ,this is the reset keyboard routine that also flushes keybaord buffer (maybe i'll include it in the assembly program so there will be no need for this in BASIC program at all).
About rtype 128, i checked it, and it seems that the 3" version (which contains two dsk images of 180k) contains some tracks with 10sectors which is why you get the "non amsdos" error (normal tracks have 9 sectors).
 BUT, i've already developed a  more versatile version of dsk2disk, which supports many non standard images with variable sectors/track, variable gap#3 length, variable sector sizes, and even more than 40 tracks!. With that, you will be able to write almost all dsk images, except some copy protected games with strange "weak sectors" locks, but fortunately i think all of these games can be found in unprotected dsk versions too! ;) (btw i've just used this new version to transfer the rtype 128 to a 3.5" disk and worked perfect!  ;D )

I'm also in a process of completely redesigning the Wifi functionality in order to avoid the need of giving AT commands all the time, and instead, have a direct WiFi communication like in serial/bluetooth mode (passthrough mode/transparent transmission). Unfortunately this requires a completely different connection model ,where TCP server will be on the PC and wifi module will be connected to it (the opposite of how is currently working), so it might need some time to finish it.

Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: 260Z on 02:42, 22 June 19
......
 BUT, i've already developed a  more versatile version of dsk2disk, which supports many non standard images with variable sectors/track, variable gap#3 length, variable sector sizes, and even more than 40 tracks!. With that, you will be able to write almost all dsk images, except some copy protected games with strange "weak sectors" locks, but fortunately i think all of these games can be found in unprotected dsk versions too! ;) (btw i've just used this new version to transfer the rtype 128 to a 3.5" disk and worked perfect!  ;D )
....


You're a bloody legend mate....  ;D


Just having my morning coffee, thinking about what I'll be doing with my day..... Giving this a test run is number one on my list now  :D

Edit : I see the new version isn't uploaded yet, all good :)

Cheers,
Rob
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: chrisgreen on 13:15, 29 June 19
Just a quick note to say thanks to @ikonsgr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=541) - got my serial interfaces today - extremely happy with them.
Looking forward to having a good play with them over the weekend and getting my machines talking to each other, as well as to my PC.
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: LambdaMikel on 17:18, 03 July 19
Anybody tried any UART modules with USIFAC by now, such as Catalex MP3 player, or FM Radio module, or MIDI UART board?
I had ordered 2 FM modules a while ago but there are still on the ship from China.
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 13:47, 04 July 19
Finally, a new MAJOR update is available:

- Complete redesign of the WiFi functionality! Now PC program runs the TCP server,enabling a direct passthrough communication which makes Wifi usage much more stable and easy to implement.
- ALL functions (except direct load) can now be used with WiFi modules too! (previous version didn't support dsk image transfer with wifi modules and CPC to PC file transfer was a bit buggy too)
- Image transfer utility now supports many "non standard" images, with variable sectors/tracks, variable gap#3 length, variable sector sizes!
- Add a new small program (setservr) for easily configure WiFi module to act as TCP server, for creating Amstrad CPC WAN/LAN networks!
- Added ~20 new games (115 games in total), in the certified "direct load (https://www.dropbox.com/sh/hzp3a4b7fktcn8c/AAAj2U8otKw26j-chnd8uUxla?dl=0)" game list.
- Update of the user's manual, add much more detail infomration on configure and  usage of WiFi modules!

You can find all updates here (https://www.dropbox.com/s/0z2cpcbxvl95s9v/Amstrad%20CPC%20serial%20interface.zip?dl=0) (or in the same link on the first page)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: 260Z on 03:49, 05 July 19
Great work!!. You've made my year.... Finally, I can run the Batman Demo on my 464  :D


The demo also works flawlessly, on floppy disc, from beginning to end. Very pleased.
EDIT : Excluding that final clown image, that upsets my vga converter.


Keep up the good work  :D


Cheers,
Rob
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: Fabrizio Radica on 15:22, 05 July 19
Anybody tried any UART modules with USIFAC by now, such as Catalex MP3 player, or FM Radio module, or MIDI UART board?
I had ordered 2 FM modules a while ago but there are still on the ship from China.
mmh... i'm really interested in MIDI UART Board...
post news when you had received (and use) it :)

I've USIfAC but i don't know how use it pratically.
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 19:27, 05 July 19
mmh... i'm really interested in MIDI UART Board...
post news when you had received (and use) it :)

I've USIfAC but i don't know how use it pratically.

I think this (https://www.dropbox.com/s/xg85264klwixksr/Amstrad%20CPC%20Serial%20Interface%20User%20Guide.pdf?dl=0) might help!  ;)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: LambdaMikel on 19:51, 05 July 19
I think this (https://www.dropbox.com/s/xg85264klwixksr/Amstrad%20CPC%20Serial%20Interface%20User%20Guide.pdf?dl=0) might help!  ;)


@ikonsgr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=541) unless you add the MIDI BAUD rate 31250 to the firmware, it won't do MIDI.
I just figured that out with LambdaSpeak 3 Serial Interface - had to change the firmware to support 31250 for that. 
I guess the PIC can do 31250?


THat might be helpful to figure out the settings for UART config registers:
http://www.barrysoft.it/blog/midi-with-pic-ausart.html (http://www.barrysoft.it/blog/midi-with-pic-ausart.html)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 19:55, 05 July 19

@ikonsgr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=541) unless you add the MIDI BAUD rate 31250 to the firmware, it won't do MIDI.
I just figured that out with LambdaSpeak 3 Serial Interface - had to change the firmware to support 31250 for that. 
I guess the PIC can do 31250?

Never tried that specific baud rate, but most probable it can. It's very easy to add this speed to the code and selecting it ,by a simple, let's say: OUT &FBD1,20
Of course, you will need to reflash the pic with the new program.
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: LambdaMikel on 19:58, 05 July 19
Never tried that specific baud rate, but most probable it can. It's very easy to add this speed to the code and selecting it ,by a simple, let's say: OUT &FBD1,20
Of course, you will need to reflash the pic with the new program.


That means the MIDI BAUD rate is already supported by USIFAC? Then it should work out of the box!

EDIT: oh, OK, I need to reflash it... I see.

I guess I was suggesting for you to change the firmware such that customers can use MIDI BAUD rate out of the box.  ;)  Just an idea, you are welcome  ;D
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 20:03, 05 July 19

That means the MIDI BAUD rate is already supported by USIFAC? Then it should work out of the box!


EDIT: oh, OK, I need to reflash it... I see.


I guess I was suggesting for you to change the firmware such that customers can use MIDI BAUD rate out of the box.  ;)
Of course i can (i have already 10 different speeds supported, where you can select them "on the fly" by giving simple OUT &FBD1,x commands), but for all of you who have already a usifac, you will need to re-program the pic (or send you another PIC with the new program  ::) )
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: LambdaMikel on 20:04, 05 July 19
Of course i can (i have already 10 different speeds supported, where you can select them "on the fly" by giving simple OUT &FBD1,x commands), but for all of you who have already a usifac, you will need to re-program the pic (or send you another PIC with the new program  ::) )


I understand that. I was just bringing to your attention that you need the baud rate 31250 for MIDI to work; I saw in the  USIFAC manual and  menus that it is not there yet. I didn't know that until I tried that with LS 3 serial interface, so I wanted to share that information with you such that you can provide a more useful product to customers.


AGain, you are welcome!


No need for a new PIC for my 2, I can do it myself. Thanks for offering to send new PICs.
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 20:36, 05 July 19
Done! The speed of 31250 can be selected by giving a simple OUT &FBD1,20
You want me to send you the new hex and give it a try?  ;D
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: LambdaMikel on 20:45, 05 July 19
Done! The speed of 31250 can be selected by giving a simple OUT &FBD1,20
You want me to send you the new hex and give it a try?  ;D


Sure! Thank you, super fast service!
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 20:57, 05 July 19

Sure! Thank you, super fast service!

Here (https://www.dropbox.com/s/ui9xyd80s8mr4w5/pic16f1579.hex?dl=0) it is.
From now on, i will flash all new boards with this version,  and i'll upload the hex file to the "official" link too!  ;)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 21:05, 05 July 19
Btw, anyone with another "special speed" request? I can add as many custom speeds as you like!  :)

Btw,i just noticed that 31250 is a speed that uart interface can match EXACTLY, all other speeds are having some small errors (usually less than 1%)in actual speed, maybe that's why it's selected for the MIDI in order to have absolute synchronization?  ::)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 13:30, 06 July 19
LambdaMikel,i think you will find this interested:
http://www.hobbytronics.co.uk/usb-host-midi
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: LambdaMikel on 04:55, 08 July 19
Thanks for the link!
USB MIDI is cool, but most of my synths are old style and have MIDI DIN (I have a USB -> DIN MIDI converter box though).

So I like this one, which is as minimal as it gets:
https://ubld.it/products/midi-breakout-board/ (https://ubld.it/products/midi-breakout-board/Unfortunately)
Unfortunately, it is no longer available on Amazon, but you can get it here:
https://www.tindie.com/products/ubldit/midi-breakout-board/?_ga=2.246732166.343271136.1562550881-1119099813.1562130274 (https://www.tindie.com/products/ubldit/midi-breakout-board/?_ga=2.246732166.343271136.1562550881-1119099813.1562130274)

I mean, the Arduino MIDI shields also work, but they are too bulky really. 
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: GUNHED on 23:47, 08 July 19
Btw, anyone with another "special speed" request? I can add as many custom speeds as you like!  :)


Great for future developments.  :) :) :)
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 10:52, 09 July 19
Thanks for the link!
USB MIDI is cool, but most of my synths are old style and have MIDI DIN (I have a USB -> DIN MIDI converter box though).
So I like this one, which is as minimal as it gets:
https://ubld.it/products/midi-breakout-board/ (https://ubld.it/products/midi-breakout-board/Unfortunately)
Unfortunately, it is no longer available on Amazon, but you can get it here:
https://www.tindie.com/products/ubldit/midi-breakout-board/?_ga=2.246732166.343271136.1562550881-1119099813.1562130274 (https://www.tindie.com/products/ubldit/midi-breakout-board/?_ga=2.246732166.343271136.1562550881-1119099813.1562130274)
I mean, the Arduino MIDI shields also work, but they are too bulky really.

That's very nice! So,by getting this MIdi adapter and connect it to usifac, you will be able to use amstrad with a synthesizer, right?
 Of course you will need some software too for this,in the end everything goes down to send and receive bytes, which can be very easily done (either in BASIC or assembly) with simple inp and out commands, you think you will be able to develop the program for this?
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: LambdaMikel on 18:31, 10 July 19
That's exactly right, @ikonsgr (http://www.cpcwiki.eu/forum/index.php?action=profile;u=541)
But I am afraid I'll try it on LambdaSpeak 3 Serial Interface first; when that works well, I'll port the MIDI CPC software to USIfAC, but that is the plan, yes!
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: ikonsgr on 18:58, 13 July 19
Now, Enough of the utilities!   :)

I've just upload a variant of  the classic pong game (along with ~dozen of more games, tested with direct load, 130+ games in total), which utilizes the serial interface!
I've named it "pong-lan" and it's a 2 player game, only that... each player is playing in its own amstrad cpc!
It's a simple basic game which you can find here (https://www.dropbox.com/sh/rdn25eso1inx6i5/AAA1rTMtlXnvTtVuYj5KrDcaa?dl=0), you can run/load it directly using the direct load function. Note that using Wifi modules, it's possible to play it through internet, and with a couple of modifications i even tried it  with... an "old friend", a Commodore 64!!! (https://www.youtube.com/watch?v=l9rWsShqKsE)   :o
Maybe the first network inter-8bit-computer game???  :D
Title: Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
Post by: LambdaMikel on 09:52, 14 July 19
Network PONG LAN PARTY??? Yeah  8)