News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)

Started by ikonsgr, 19:20, 05 January 19

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

GUNHED

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!  :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

LambdaMikel

Quote from: GUNHED on 03: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!  :) :) :)
My 2 also arrived, and great quality as well - didn't have a chance to test them yet though.
Thanks @ikonsgr !!  :)

ikonsgr

#52
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 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:

[attach=1,msg171002]

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.
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!

VincentGR

Quote from: GUNHED on 03: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!  :) :) :)


Waiting for a video with that  ;D

GUNHED

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?
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Patrick

It sounds good for me but add also ground.

ikonsgr

Quote from: GUNHED on 13:42, 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.

Quote from: GUNHED on 13:42, 24 February 19
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.

GUNHED

Quote from: ikonsgr on 14:03, 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.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Patrick

Another thing to consider is the length of the wires. Avoid using too long wires. TTL is not RS232.

Audronic

@ikonsgr


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


Thanks.  Ray
Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

ikonsgr


Audronic

@ikonsgr


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


Thanks  Ray
Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

ikonsgr

The link was  already in the 1st message, but now i also changed the color to red to easily spotted by anyone

Audronic

Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

JonB

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)?

ComSoft6128

Good question.


As far as I'm aware it is an Amsdos only program at the moment but @ikonsgr will no doubt answer it definitively later.


Cheers,


Peter

ikonsgr

Quote from: JonB on 08: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)?

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...  :)

JonB

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?

GUNHED

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).

http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

ikonsgr

#69
Quote from: JonB on 07: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?
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

GUNHED

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?

http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Audronic

Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

ikonsgr

Quote from: GUNHED on 10: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?

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

ikonsgr

Quote from: Audronic on 11:45, 01 March 19
@GUNHED


? 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).



ikonsgr

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...   ::)

Powered by SMFPacks Menu Editor Mod