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 1 Guest are viewing this topic.

ikonsgr

Quote from: LizWiz on 12:18, 21 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! ;-)

GUNHED

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

Quote from: GUNHED on 23:47, 30 November 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!  ;)

GUNHED

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

LizWiz

#254
Quote from: ikonsgr on 01:06, 30 November 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)

ikonsgr

Quote from: LizWiz on 12:08, 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)

madlax39

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

ikonsgr

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!  ;)

madlax39

Hello,
Thanks for your's help, i am whaiting for pic socket adaptator.
Merry Christmas too!

cupantae

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.

cupantae

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.

ikonsgr

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!  ;)

cupantae

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.

Quote from: ikonsgr on 00:16, 12 January 21Btw,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.

ikonsgr

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!  ;)

Audronic

@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
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

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.

Audronic

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

Animalgril987

Quote from: cupantae on 15:07, 17 January 21The 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.

madlax39

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!

ikonsgr

Quote from: madlax39 on 17: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!
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  :)

madlax39

Perfect, this will help me to build my USIfAC RS232 card. Thank you!

GUNHED

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

madlax39


zhulien

Is USIfAC pronounced Uzi Fu**? (awesome name btw)

ikonsgr

Quote from: zhulien on 12:11, 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:

Powered by SMFPacks Menu Editor Mod