Link to editorial & letters    Link to files
Previous disk program notes    Next disk program notes


Title SCREEN$

Disk 14 program notes


PROGNOTE:   SAM/PSION COMMS. by J.Jennings                      
                                                                
The program Sam Comms has been developed from the need I had to 
connect my Psion Organiser LZ64 computer to my SAM Coupe.       
                                                                
To  use  the  program you  need  the  Comms  interface for  both
machines (RS232).                                               
                                                                
The  software for  the SAM  end consists  of a Basic  program, a
screen$ file,  a font file,  and a file  called Blank. You  will
also need the code  file called ccode.cde off the comms software
that comes with the SAM Comms  interface. This needs to be  run,
the settings changed to:- 300 baud rate, data bits set to 8, and
stop bits  set to 1. This then needs  to be initialised and then
saved and transferred to a working disc.                        
(Eds note.. Samco have let me include a ready done comms code on
this disc, so you've no need to bother initialising one.)       
                                                                
With all the above files on the working disc the SAM software is
ready to run.                                                   
The Psion  Comms setup should be set to the following:- 300 baud
rate, parity set to none, data bits  set to 8, stop bits set  to
1,  hand set  to none,  protocol= none,  echo= host,  width= 64,
timeout=  none, REOL=,  REOF=,  TEOL=  ,  TEOF=
, RTRN  and TTRN can  be set to your  own requirements (see
Psion  Comms handbook). I  will attempt to  explain why settings
are set as above.                                               
                                                                
The SAM Software.                                               
The options are:-                                               
1.RECEIVE DATA                                                  
2.SEND DATA                                                     
3.LOAD DATA FROM DISC                                           
4.SAVE DATA TO DISC                                             
5.VIEW DATA IN MEMORY                                           
6.CLEAR MEMORY                                                  
7.TASWORD CONVERT                                               
                                                                
                                                                
                                                                
1.RECEIVE DATA.                                                 
This  prepares  the  SAM  to receive  data  from  the  Psion. An
indicator shows  the  SAM's  ready to  receive  state.  The  SAM
returns to the main  menu when transmission is  complete. Before
receiving the program clears the part of memory that the data is
loaded into (65536 onwards).                                    
                                                                
2.SEND DATA.                                                    
Before sending data a data file (ASCII Format) must be loaded in
memory by using the  LOAD DATA FROM DISC option. This  option as
the name  suggests sends data  to the  Psion (I  will cover  the
method of reception by the Psion later).                        
                                                                
3.LOAD DATA FROM DISC                                           
This  option can  be used  to load data  already saved  from the
Psion or can  be used to load  data prepared by  a wordprocessor
like  Tasword  or  Outwrite. This  enables  you to  type  in OPL
programs or Files or notes on the SAM making use of a full sized
keyboard and then send the data to the Psion.                   
                                                                
4.SAVE DATA TO DISC.                                            
This option is used to save data  in its Psion format or Tasword
format after using option 7.                                    
                                                                
5.VIEW DATA IN MEMORY.                                          
This option allows you to see the data as  it was transmitted or
prior to sending or even after using option 7.                  
                                                                
6.CLEAR MEMORY.                                                 
This  manually clears  the  memory, which  is done automatically
before receiving or loading.                                    
                                                                
7.TASWORD CONVERT.                                              
This option  allows recieved data  to be converted  into Tasword
format allowing the files to be loaded into Tasword or Outwrite.
The procedure  strips out  all unwanted control codes  and pads 
each line to 64 characters with spaces.                         
                                                                
                                                                
                                                                
THE PSION END.                                                  
                                                                
TO TRANSMIT.                                                    
Go to  the main Psion Comms  menu and select  Transmit, you will
then  be  prompted to  select Files,  Proceedures, or  Notes. By
setting the SAM to receive you can then transmit from the Psion.
                                                                
                                                                
TO RECEIVE TO THE PSION.                                        
Select Capture on the Psion  Comms menu and then press Mode  key
this  accesses  another menu  (you  should  make sure  that  the
capture buffer  is clear  by  choosing the  clear option), after
doing this select  Term from the sub menu and  the Psion is then
ready to receive  data. Upon completion  of the transfer   press
the  On/Clear key  on  the Psion  and tidy  up  the file  in the
capture buffer. Press Mode  once again and select save  to which
ever Pak you require (I  select A and at  a later stage copy  to
another pak if necassary).                                      
                                                                
                                                                
You  are then asked  what you  want to save  the conents  of the
capture buffer as ie: File Proceedure or Notes.                 
                                                                
Note: Setting the Width parameter to  64 allows any Notes or OPL
Progs to be  captured in readable format  but adds spaces  which
lengthen the Notes  or OPL Progs upon  saving of these.  However
this can be  rectified by  deleting all unwanted  spaces in  the
Capture buffer  or after  saving, editing  from within the  Prog
menu or Notes.                                                  
                                                                
Files sent and transmitted contain  which can be altered on
reception and transmission by using the RTRN and TTRN parameters
on the Psion.                                                   
I have  found that  by saving data  files without  conversion to
Tasword format and if you have Wordmaster, if  you load the file
into Wordmaster you will see  that a large dot is placed  at the
beginning of all Files. These appear to be  Wordmasters  symbols
for control characters and by deleting all but these  characters
one can then use them to prepare files. However some tidying  up
is necessary at the Psion end to put  them  into  some  sort  of
order. This program and its use is far from  perfect  but  is  a
start and I hope will be of use to the members who  have  Psions
or other computers as I'm sure  that  it  may  be  adaptable  to
others and I would welcome any improvements or enhancements.    
                                                                
The program will work on both 256k and 512k machines. As well as
the  Tasword converted files  loading into  Tasword and Outwrite
they also load  into SAMSCRATCH. Conversely OPL progs and  Notes
can be prepared with SAMSCRATCH.                                
                                                                
These notes were prepared on  the Psion and downloaded into  the
SAM and tidied up using SAMSCRATCH.                             
                                                                
I must also thank  Dave Tonks for the advice and help he gave me
on this project.                                                
----------------------------------------------------------------
                                                                
                                                                
                                                                
                                                                
          Notes for Ferguson RGB converter by G.A.Bates         
                                                                
Dear Dave,                                                      
                                                                
Looking back at my files, it's just a year since last I sent you
a contribution to SAM Supplement. This is  very  remiss  of  me,
particularly as I had the answer to a problem  investigated  and
reported by yourself as long ago as issue 6!                    
However, perhaps I can make amends now and pass on a  couple  of
other items at the same time.                                   
The problem in question was the  difficulty  some  members  were
having in loading the Supplement editorial; all they got  was  a
blank screen!                                                   
                                                                
It turned out that, in one case, the member concerned was  using
a Ferguson TX TV with RGB input in conjunction with SAM's linear
RGB output and, in another, a Microvitec monitor. It was  stated
that neither of these could utilise the linear  RGB  output  and
must be connected to the TTL RGB, which considerably  cuts  down
the range of available colours.                                 
However, this is not the  case  with  the  Ferguson  Model  MC01
TV/Monitor (which I assume is  being  referred  to)  which  will
accept linear RGB. The problem is that it requires an RGB signal
of 0 - 1.5V for the full colour range, whereas SAM only provides
about half of this.                                             
The answer is to amplify the linear RGB signals and I made up  a
suitable three channel  interface  unit  using  high  slew  rate
op-amps to give the necessary frequency response - LM6361N. They
are connected in non-inverting mode as shown in the accompanying
diagram. Power is taken from the +5V line in SAM's SCART  socket
but a -5V supply is also needed. This I derived from the +5V  by
means of a DC-DC converter, available from Maplin's (Order  code
FE57M). The arrangement of the converter  is  shown  in  another
diagram.  The whole thing fits  into  a  neat  little  box  with
flying leads for the SAM SCART connector and 8-pin  DIN  to  the
TV.                                                             
Actually, the 8-pin DIN goes into another little  box,  together
with the lead from my Ferguson RGB adaptor on the Spectrum.  One
press of a button and I  switch  from  SAM  screen  to  Spectrum
screen and vice versa.                                          
If anyone would like help with either of these interface units I
would be happy for them to give me a ring on 0332-42442 ext 6244
during office hours or 0742-669532 at other times.              
                                                                
Eds note...                                                     
           Both wiring diagrams are in the  program  menu  under
the heading "R.G.B."                                            
The DUMP routine will have already been loaded for you to make a
hard copy of either of them.                                    
----------------------------------------------------------------
                                                                
                  DIR-DATE routine by G.A.Bates                 
                                                                
This  item  concerns  directories with dates  appended  to  the 
file names; very useful in conjunction with  a  word  processor.
Being the owner of a SAM-bus and  Masterdos  I  can  call  up  a
directory which includes the date but it also includes  a  great
deal of other information and each file occupies a line  on  the
screen. Not very neat and,  with  a  lot  of  files,  a  lot  of
scrolling.                                                      
With just the file name and date displayed it should be possible
to have three columns on screen and remove the need  to  do  any
scrolling. I started by reading  the  directory  into  a  string
variable using DIR$, manipulating this  to  get  the  individual
file names and using FSTAT("filename",7) - needs  MasterBASIC  -
to get the date. Success, but very slow!                        
                                                                
To overcome the speed problem I  performed  the  same  operation
from a RAM disc - very much faster - but first you have  to  get
the relevant information there. It's possible  to  back  up  the
whole of a directory  to  RAM  disc  but  all  we  need  is  the
directory information without the actual files.  To  do  this  I
used the much more versatile Masterdos  READ  AT  and  WRITE  AT
commands which enable as many as 1024 sectors to be  transferred
at once. But first, determine how long  the  directory  actually
is, using DSTAT(1,6) and read the exact number of blocks into  a
suitable memory address. Make sure it doesn't  clash  with  your
program; I corrupted the Tasword "help" screen  by  choosing  an
inappropriate location!                                         
                                                                
Now format a RAM disc (d3) with the appropriate length directory
(you have to let it have one track  for  files!),  make  it  the
current drive, go to the appropriate subdirectory and  use  DIR$
and FSTAT as before. Finally, revert to drive 1 and reformat  d3
to zero length (it could cause problems if  you  left  it  lying
around - a big directory but  no  files!).  I  incorporated  the
routine ("dir-date") into the SAM basic part of my LERM  Samtape
version of Tasword II but there  are  obviously  other  possible
applications.                                                   
                                                                
EDs note...                                                     
           The routine described  is  in  the  issue  under  the
heading DIR-DATE on the program menu.                           
I have given you the option of copying it to another  disc,  but
not to run  it  from  this  issue,  as  it  needs  Masterdos  to
operate. It is also non-autorunning.                            
----------------------------------------------------------------
                                                                
                                                                
                                                                
                        SAMSCRATCH 3.3-85                       
                                                                
        ver 3.3 Dave Hall. 85 column mods by Andy Wright        
                                                                
Yes,  yet  another Samscratch.  Samscratch  now has  a paragraph
justify option operated using  shift + F4. It's  not as tidy  as
I'd have liked but it works. It also works with the right margin
re-set.                                                         
                                                                
The 85 column version was converted for me by Andy to  help with
a  Supplement  project  that I'm  working  on  and  is primarily
intended to  be used  with  files created  using the  64  column
version converted to 85 columns,  although it's perfectly OK  to
use  if your  eyes will take  working in  85 columns.  Note that
large 85  column files converted  back to 64 columns  may be too
large for the  320 line limit. I have included a simple 64 to 85
column converter  for files  saved as CODE,  but the  paragraphs
will need justifying in  the 85 column version. In addition ver.
3.3-85, which  prints in  condensed  mode offers  the  following
                                                                
print options :-                                                
          Select print style                                    
          Pause between pages                                   
          Left or right margins  or centered (also selectable   
                                                  between pages)
          Multiple copies if required                           
                                                                
The paragraph  justify option is included on the shift+edit help
page.  Samscratch is now split into  two files, a loader and    
the word processor. The  'save program' option at the  edit menu
will still work,  but the loader will need to  be copied over as
well.                                                           
                                                                
The shift + F4 justify paragraph option has a restriction;      
                                                                
          There must be a blank line between paragraphs         
                                                                
Blank  lines created by  the routine plus  any pre-existing ones
will be removed, leaving one blank line between paragraphs.     
                                                                
The files are :-                                                
                                                                
    Loader           ss 85                                      
    Main             scratch85                                  
    File             menu85$                                    
    File             help33text                                 
                                                                
After twice selecting  load instead of save  and losing a  large
file  each time, I  have modified the  edit screen to  work with
letters  instead of  numbers, less  chance  of the  'finger slip
error'. I hope my small addition to Samscratch will help others.
With this  facility added, I now use Samscratch in preference to
the faster but less friendly (keypress-wise)  Tasword 2. Perhaps
before too much longer we will get a merge file option or even a
Masterbasic/Masterdos specific version of Samscratch.           
----------------------------------------------------------------
                                                                
POKES AND CHEATS compiled by Bob Evans                          
Another selection of pokes and cheats to help you beat that high
score.                                                          
SAM-LINK by P.Wood                                              
                                                                
Peter has managed to get the Opus disc drive to talk to the  Sam
through the printer cable.                                      
A full description of how he did it is  in  the  "HINTS & TIPS" 
section of this issue.                                          
----------------------------------------------------------------
                                                                
SAMOS sent in by Ian Spencer                                    
                                                                
This is a very useful machine code monitor. It makes good use of
MODE 3 with it's clear layout, and is very straight  forward  to
use. It is driven from a menu,  which  is  displayed  the  whole
time.                                                           
                                                                
----------------------------------------------------------------
                                                                
                                                                
                                                                
.                                                               
BAZA sent in by Ian Spencer                                     
                                                                
Using the same basic layout as SAMOS, this is a  database  which
again is simplicity itself to understand and set up.            
Very useful if you want a quick  and  easy  way  to  store  your
records.                                                        
----------------------------------------------------------------
MACHINE CODE LESSON 2 by G.Bobker                               
                                                                
The second in Geoff's series of  machine  code  tutorials.  This
month he continues the subject of PAGING from where he left  off
last month.                                                     
----------------------------------------------------------------
GERMAN TUTOR by Paul Skinner                                    
                                                                
An unusual subject for a computer, but done extremely well. This
is a teach yourself German database, comprising of a  dictionary
of words, German/English, English/German translations using both
words and phrases, pronunciation, and the option  to  update  if
more data is added.                                             
DIR SORTER by Paul Skinner                                      
                                                                
A simple utility which sorts the directory  of  your  disc  into
alphabetical order, and resaves it to  your  disc.  Makes  DIR's
look very ordered and neat.                                     
                                                                
----------------------------------------------------------------
                                                                
                                                                
                                                                
HAM RADIO by Ian Spencer                                        
                                                                
Especially for all the radio hams out  there,  this  is  a  demo
version of Ian's program which will allow you  to  recieve  RTTY
throught the cassette socket of your Sam.                       
                                                                
Ian says that this is only the  first  part  of  a  much  bigger
program, but you will need the Sambus for it to work  correctly,
because of the timing problems.                                 
                                                                
The program on this issue will allow you to decode RTTY  signals
at 45/50  and 75 bauds, and  it  allows  unshift  on  space  and
mark/space inversion.                                           
The tones for "1" and "0" are centered  around  1300Hz  and  are
shown in this demo version as a modulated  border,  rather  like
the tape loading signal.                                        
                                                                
Ian has nearly finished the SSTV decode routines, and if  anyone
is interested they can contact him for updates of the program.  
                                                                
His address is:                                                 
              Fichtenweg 10C                                    
              5203 Much                                         
              West Germany                                      
----------------------------------------------------------------
                                                                
                                                                
                                                                
                                                                
                                                                
SNAKE by D.J.Munro                                              
                                                                
A nice little game of centipede by Mr. Munro. See the letter  in
the "HINTS and TIPS" section of this issue, for  an  explanation
of how he wrote it.                                             
                                                                
----------------------------------------------------------------
                                                                
ANIMATION by D.Tonks                                            
                                                                
This is an explanation of how I do animations on the  Sam.  I've
only given the basics of animation, with a  demo  to  illustrate
it. This will get you used to the processes used, and  hopefully
next issue, I will take it a little further and try  to  explain
how I did this issue's front end.                               
----------------------------------------------------------------
                                                                
                                                                
                                                                
.                                                               

Link to the top of this document    Link to the main index
Link to editorial & letters    Link to files
Previous disk program notes    Next disk program notes