Author Topic: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)  (Read 50503 times)

0 Members and 3 Guests are viewing this topic.

Offline ikonsgr

  • 6128 Plus
  • ******
  • Posts: 551
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 551
  • Likes Given: 104
Re: Protocol?
« Reply #250 on: 02:06, 30 November 20 »
As Linux user I'd like to replace the Windows program. Maybe with something with a web interface, so that I could use e.g. a Raspberry to serve the disk images/files.
Is the serial protocol the USlfAC is using documented somewhere? Or is the source code of the Windows program available?

Here you can find the new User's manual for the interface,and also the new Windows utility program. I use Delphi (visual pascal) as programming language, if you are interested  i can provide with the source code too.
And here is a small presentation for the new board. I will open a new thread for it, in a couple of days! ;-)

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.684
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 1261
  • Likes Given: 2956
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #251 on: 00:47, 01 December 20 »
The FDC emulation just is amazing!!!
http://futureos.de --> Get the revolutionary FutureOS (Update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline ikonsgr

  • 6128 Plus
  • ******
  • Posts: 551
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 551
  • Likes Given: 104
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #252 on: 09:25, 01 December 20 »
The FDC emulation just is amazing!!!
And wait to see loading games from an 80 tracks/dual head 800kb Parados dsk image... on a CPC 464!  :P

Btw, the revelation is finally made!  ;)
« Last Edit: 09:28, 01 December 20 by ikonsgr »

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.684
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 1261
  • Likes Given: 2956
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #253 on: 22:02, 01 December 20 »
And wait to see loading games from an 80 tracks/dual head 800kb Parados dsk image... on a CPC 464!  :P

Btw, the revelation is finally made!  ;)


Oh, I wait for 80 Trk. / DS Vortex Format and X-DDOS ROM support.  :) :) :) :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline LizWiz

  • Speccy
  • *
  • Posts: 2
  • Country: de
  • Liked: 2
  • Likes Given: 0
Re: Protocol?
« Reply #254 on: 13:08, 12 December 20 »
Here you can find the new User's manual for the interface,and also the new Windows utility program. I use Delphi (visual pascal) as programming language, if you are interested  i can provide with the source code too.
And here is a small presentation for the new board. I will open a new thread for it, in a couple of days! ;-)
I was not really aware of the new board, looks awesome!I can't promise that I will produce something usable, but if you could provide the source code of your Windows program it would highly increase the probability  8)
« Last Edit: 13:22, 12 December 20 by LizWiz »

Offline ikonsgr

  • 6128 Plus
  • ******
  • Posts: 551
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 551
  • Likes Given: 104
Re: Protocol?
« Reply #255 on: 18:45, 12 December 20 »
I was not really aware of the new board, looks awesome!I can't promise that I will produce something usable, but if you could provide the source code of your Windows program it would highly increase the probability  8)

pm sent!  8)

Offline madlax39

  • CPC464
  • **
  • Posts: 12
  • Country: fr
  • Liked: 18
  • Likes Given: 1
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #256 on: 10:58, 24 December 20 »
Hello,
I bought all components to make the board V1,
I don't know how to program the PIC16F1579 with my pickit 3 (original microchip).
Can you tell me what software to use and the electric diagram to connect the PIC to the Pickit3?
Thank you

Offline ikonsgr

  • 6128 Plus
  • ******
  • Posts: 551
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 551
  • Likes Given: 104
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #257 on: 11:50, 25 December 20 »
The easiest way to do it is to have a cheap zif socket. You just plug the icsp connector from pickit3 and place the pic on zif socket (there are diagrams and notes on the socket that shows jumper settings & place for the 16F1579)
As for the software,you can use the MPLAB IPE which is part of MPLAB IDE and you can download from here

Merry Christmas!  ;)
« Last Edit: 12:06, 25 December 20 by ikonsgr »

Offline madlax39

  • CPC464
  • **
  • Posts: 12
  • Country: fr
  • Liked: 18
  • Likes Given: 1
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #258 on: 23:09, 25 December 20 »
Hello,
Thanks for your's help, i am whaiting for pic socket adaptator.
Merry Christmas too!

Offline cupantae

  • CPC464
  • **
  • Posts: 3
  • Country: ie
  • Liked: 1
  • Likes Given: 1
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #259 on: 02:23, 04 January 21 »
Thanks ikonsgr for this amazing device which I've been slowly learning to use for the past couple of months. I'm using Linux as well, trying to adapt the TERMINAL.BAS program to use the CPC as a dumb terminal to a RPi.
@LizWiz, let us know if you manage to compile the delphi utility on Linux - freepascal.org compiler could work or could get the free trial of delphi.

Offline cupantae

  • CPC464
  • **
  • Posts: 3
  • Country: ie
  • Liked: 1
  • Likes Given: 1
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #260 on: 00:58, 12 January 21 »
I now have a somewhat usable Linux shell on my Amstrad greenscreen   ;D ;D this was basically my goal when I took back out the old CPC464 from my parents house last summer so I'm pretty pleased. Main headache is I'll definitely have to replace the graphics cable and maybe power cable.

I've got to just adapt the code more to add fixes and features like pressing <up> or <Tab>. Probably not quickly though.

@ikonsgr: if I put a modified version of your TERMINAL.BAS code online, can I license it as GPL? I saw a question earlier in the thread about licensing; not sure if you answered.

Offline ikonsgr

  • 6128 Plus
  • ******
  • Posts: 551
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 551
  • Likes Given: 104
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #261 on: 01:16, 12 January 21 »
Of course you can, USIfAC project is open source/freeware anyway  ;)
Btw,this modified terminal is actually somekind of linux cli for amstrad?
And note that the new USIFAC II board, is fully compatible with USIfAC (serial interface works exactly the same way, using the same ports,same responds, and same control port commands for clear buffer, speed codes etc) ,so any software made for if should work for the new board too!  ;)
« Last Edit: 01:22, 12 January 21 by ikonsgr »

Offline cupantae

  • CPC464
  • **
  • Posts: 3
  • Country: ie
  • Liked: 1
  • Likes Given: 1
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #262 on: 16:07, 17 January 21 »
Thank you very much! I am going to post things on github shortly and I'll post the link here. I want to work out the most minimal instructions possible: as it is, I don't have an efficient method to convert the BASIC code to a tape image. I've attached the basic code and tape image.

Btw,this modified terminal is actually somekind of linux cli for amstrad?
That's right: the goal is to use the CPC as a terminal to my linux machine. That means that the amstrad is sending text and receiving text, but not doing any real processing itself other than the text stream.This was common in the 70s where there was one mainframe computer which many users connected to with something like https://en.wikipedia.org/wiki/VT100 - here the raspberry pi is the mainframe while the CPC is the VT100  ;D
So what does that mean for what I want to create? At present, text from linux is printed directly onto the amstrad screen, while text from amstrad keyboard is printed to screen and sent to linux over serial. The issue with this is that it's not all text: there are "escape codes" which should do things like clear screen, return to and edit past commands, move cursor etc. Right now they just print to screen as things like "]H" or "]P".
So what I need to do effectively is to clone functionality of DEC's old equipment so these escape codes work. That's what linux "terminal emulators" do as well.

I'm not a real programmer so my progress will not be impressive. I tried editing the code more substantially but it would either not work or have bugs I couldn't understand.I restarted my efforts using the smallest edits I could manage. This term464v3 instance has only the following edits:500 CALL &BB03    ---> instead of CLEAR because CPC464 hasn't got that command520 WINDOW #1,1,80,1,25  ---> Window #1 is now fullscreen     ..... Then I changed all PRINT #2 mentions to PRINT #1 .....  :laugh: 660 REM a$="CPC>"+A$   ---> commented out so that amstrad sends just the input you typed
Your USIfAC version 2 looks seriously impressive! The extra speed/buffering might come in handy. At the moment I'm using 115200 baud only.

Offline ikonsgr

  • 6128 Plus
  • ******
  • Posts: 551
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 551
  • Likes Given: 104
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #263 on: 17:57, 17 January 21 »
Well in terms of making programs to utilize USIfAC interface i think it's pretty easy to do it, either on BASIC or Assembly.
You send directly a byte/char by giving:
 OUT &FBD0,x
And for receive, first check if receive buffer has available byte:
INP (&FBD1)
if returns '1' buffer is empty, if '255' then you can get byte/char with a simple:
INP(&FBD0)
What ever complicated application you might want to develop, everything will end up to these simpe instructions!  ;)

Online Audronic

  • 6128 Plus
  • ******
  • Posts: 1.452
  • Country: au
  • I know RST3 . I now know a little More.
  • Liked: 321
  • Likes Given: 737
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #264 on: 07:52, 19 January 21 »
@ikonsgr

I just had a bit of a Play with a Modified 40009 ROM (Used on a CPC464) to save me the "A$="xxxxxxx"
Also you can Use Uppercase or Lowercase for the Commands.
The rom has 32 Rom Slots and has Basic 1.1 .

The File name is " 40009-R2.rom "

UPDATE:-
This has been tested on an Amstrad CPC464
with the LK Links 1 and 2 ONLY connected for AWA
I have not tested it for any other combination.

Keep Safe

Ray
« Last Edit: 05:59, 21 January 21 by 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.

Offline ikonsgr

  • 6128 Plus
  • ******
  • Posts: 551
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 551
  • Likes Given: 104
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #265 on: 11:44, 20 January 21 »
So, if i get it right, this is a modified firmware + Basic 1.1 for CPC 464?
And you need Gate Array 40009 to work? I didn't know there was such version of the GA chip, i thought there was 2 versions only, 40007 for cpc464 and 40010 for cpc 6128.

Online Audronic

  • 6128 Plus
  • ******
  • Posts: 1.452
  • Country: au
  • I know RST3 . I now know a little More.
  • Liked: 321
  • Likes Given: 737
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #266 on: 12:53, 20 January 21 »
@ikonsgr


No Sorry, The Rom in the CPC464's Number is 40009, I have just replaced the Rom with one I had worked on some years ago.
I gives me Basic 1.1 and has had Patches for 32 Rom Slots, and some Boot up screen adjustments.
I Have been further testing it today and it works well _ No Problems.
I wanted to check that I can use Upper Case and Lower case for the commands, and it seems that it works.

Keep up with the excellent project

Keep Safe

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.

Offline Animalgril987

  • Supporter
  • CPC6128
  • *
  • Posts: 186
  • Country: gb
  • Liked: 87
  • Likes Given: 228
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #267 on: 16:34, 24 January 21 »
The issue with this is that it's not all text: there are "escape codes" which should do things like clear screen, return to and edit past commands, move cursor etc. Right now they just print to screen as things like "]H" or "]P".
What character are you using to say next character is a control code? Just parse your input for this character, then use a lookup table to convert the next character into a CPC control code f.e. control code &0C (12 decimal)  is equivalent to CLS.

All CPC control codes are listed in the user manual (chapter 9 pages 2 to 4) of CPC464 manual (2nd 3dition). They're probably the wiki somewhere, as well.

Offline madlax39

  • CPC464
  • **
  • Posts: 12
  • Country: fr
  • Liked: 18
  • Likes Given: 1
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #268 on: 18:46, 27 January 21 »
GREAT! Thank you, it's work now :)
I use it to communicate with a PC via RS232 and windows terminal
Could you give the electrical diagram of your card, I would like to redo one with an integrated MAX232 ...
Thank you again and very, very good work!

Offline ikonsgr

  • 6128 Plus
  • ******
  • Posts: 551
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 551
  • Likes Given: 104
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #269 on: 09:44, 29 January 21 »
GREAT! Thank you, it's work now :)
I use it to communicate with a PC via RS232 and windows terminal
Could you give the electrical diagram of your card, I would like to redo one with an integrated MAX232 ...
Thank you again and very, very good work!
Here is the schematics of the USIfAC board. The 40pin connector corresponds to the 50pin Expansion port,i just cut the last 10pins as i didn't use them, to make board smaller  :)

Offline madlax39

  • CPC464
  • **
  • Posts: 12
  • Country: fr
  • Liked: 18
  • Likes Given: 1
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #270 on: 10:08, 29 January 21 »
Perfect, this will help me to build my USIfAC RS232 card. Thank you!
« Last Edit: 16:09, 29 January 21 by madlax39 »

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.684
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 1261
  • Likes Given: 2956
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #271 on: 18:55, 29 January 21 »
So, with 12 Volt. Nice idea. What needs to be done to to convert an regular USIfAC to that?
http://futureos.de --> Get the revolutionary FutureOS (Update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline madlax39

  • CPC464
  • **
  • Posts: 12
  • Country: fr
  • Liked: 18
  • Likes Given: 1
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #272 on: 22:23, 29 January 21 »
« Last Edit: 23:55, 30 January 21 by madlax39 »

Offline zhulien

  • 6128 Plus
  • ******
  • Posts: 715
  • Country: au
  • aka Vorax
    • 8bitology
  • Liked: 289
  • Likes Given: 298
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #273 on: 13:11, 30 January 21 »
Is USIfAC pronounced Uzi Fu**? (awesome name btw)

Offline ikonsgr

  • 6128 Plus
  • ******
  • Posts: 551
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 551
  • Likes Given: 104
Re: Universal Serial Interface for Amstrad CPC (a.k.a USIfAC)
« Reply #274 on: 14:04, 30 January 21 »
Is USIfAC pronounced Uzi Fu**? (awesome name btw)
I suppose it does... :)
But, actually it's an acronym (originally proposed by the good cpcwiki member Gunhed):
 Universal Serial Interface for Amstrad CPC!  :)
But, i'm glad that you thought it was derived from the..."F" word, afterall it's... a Fu**ing nice & cheap hardware for amstrad, don't you think?  ;D :laugh: