home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1997
/
ARCHIVE_97.iso
/
text
/
hints
/
vol_10
/
issue_11
< prev
next >
Wrap
Text File
|
1997-08-11
|
12KB
|
279 lines
Hints and Tips
10.11
Control in the classroom - One of the areas most frequently lacking
in schoolsæ IT curriculums is that of Control. A major factor in this
is the cost of buying buffer boxes and the various items of inputs
and outputs that would be connected to them. A high quality buffer
box such as the Commotion Serial Control Box costs around ú240, so if
you wanted, say, ten of them for use with a class in a high school,
you are looking at around ú2,500 cost straightaway. This may well be
worthwhile if the school can afford it, but what are the other lower
cost options?
10.11
You could go for on-screen simulation using software such as Focus
ITæs excellent Visual Control Learning package - a good example of
recent innovation for Acorn computers only.
10.11
However, many schools already have the old green Deltronics buffer
boxes dating back to use with the BBC Micro. Indeed, one of the last
uses that Beebs are being put to locally is their use with these
boxes. You can, of course, use these boxes with later Acorn A series
machines but that involves buying a user port for each machine they
are to be used on. At around ú40 a time, thatæs up to ú400 for ten
machines, and you still need to buy software to run them.
10.11
Fortunately, Design IT have come up with a more affordable solution.
They have a modification available to run these boxes from the
parallel port. You are limited to five inputs from a machine with a
bi-directional parallel port, i.e. A30x0 or later, or two inputs from
an older machine with a uni-directional parallel port, but five
inputs should be enough for many useful applications. The
modification involves:
10.11
a) buying a special parallel port lead with a modification kit, at
around ú12 per machine. Not all of these boxes use the same type of
lead; there are two variations, but both are catered for, though this
should be specified on your order. The two types are (i) those that
connect to a D connector on the back of the box and (ii) those with
an extension type of lead that connects to an existing ribbon cable
coming out from inside the box.
10.11
b) buying a site licence to drive it, at ú40 for a primary school and
ú80 for a secondary school.
10.11
The modification is a bit fiddly to fit but anyone who is able to
solder three connections, cut a track and change two small chips
(only necessary for some of the boxes) should be able to do it. If
you get stuck, there is friendly help at the end of the phone line.
It is the sort of job that may take a non-technician an hour or so
the first time, while you work out exactly what has to be done, but
after that it should only be a few minutes per box if you are
reasonably skilled at soldering. Thus you can have ten machines up
and running for around ú200 or twenty for ú320 - a considerable
saving, particularly considering that this includes the software to
run it on a site licence basis. Incidentally, the modification does
not stop the buffer box still being used on a BBC as and when
required.
10.11
The software, called DelTron, portrays the buffer box in a window
(see above) with indication as to which inputs and/or outputs are
switched on. It allows you to control it via a Logo type language of
procedures in a manner akin to others of the same kind. I have found
that it is vital to turn the softwareæs Éauto senseæ (of the box)
feature off in order to get it to work, but that is easily done.
10.11
A well thought out and economical idea to Érecycleæ these boxes and
make them Égreenæ in more ways than one.
10.11
Mike Battersby, Kingston Schoolsæ IT Unit
10.11
Outline fonts in windows - Getting outline fonts in RISC OS windows
is a rarely covered topic in even the best programming courses and
books and, without the PRMs or a lot of time to experiment in, it is
nearly impossible to utilise this feature. Most books just ignore it
or include an obscure little note about it.
10.11
Since the arrival of RISC OS 3.6, outline fonts can be put all around
the desktop simply by changing the configuration. So why do you need
them any more?
10.11
I find that putting outline fonts into windows improves the
appearance (and sometimes usability) of a program substantially. In
days gone by, they were not included in commercial programs because
of the time it took to display them. However, in the era of the Risc
PC (and the A7000+), fonts can be displayed very easily and quickly.
10.11
To make things a lot simpler (for you and me), I shall assume that a
template editor is being used and windows are being loaded from
templates. I will also put the code in Basic, although the principles
can be ported to C or machine code without too much hassle.
10.11
Firstly, a simple template needs to be created. Any editor can be
used, but do not use very old versions of these programs as they will
probably be geared to RISC OS 2. I recommend TemplEd above all others.
10.11
Design a simple window like the one in the diagram. To be safe, only
use fonts that are built into the computeræs ROM (Trinity, Corpus and
Homerton). Make a note of all the font names (in full) and sizes that
appear in all of your icons that are outline. Please note that to
have an outline font in an icon, the icon must be indirected. Then,
save your template as usual in your program directory.
10.11
(This is a ludicrous example of a template which does not conform at
all to the RISC OS Style Guide but it illustrates the principle quite
well.)
10.11
To load a template which has outline fonts in it, you use the same
SWI call but you need a 256 byte memory block containing all the
necessary font handles for your windows. This is done by the
following routine. It should be called before the template loading
routine.
10.11
DEFPROCget_fonts
10.11
DIM font% 256 : REM Space for the font
10.11
handles
10.11
READ loops%
10.11
FOR pass%=1 TO loops%
10.11
offset%=(pass%-1)*4
10.11
READ name$
10.11
READ x%
10.11
READ y%
10.11
SYS öFont_FindFontò,,name$,x%*16,y%*16
10.11
TO font%!offset%
10.11
NEXT pass%
10.11
DATA 3 :REM Number of fonts to reserve
10.11
DATA öHomerton.Medium.Italicò,12,12 :
10.11
REM Font name,x size,y size
10.11
DATA öTrinity.Mediumò,16,16
10.11
DATA öCorpus.Boldò,42,42
10.11
ENDPROC
10.11
The above routine is very self-explanatory. You can change the font
handles which are obtained by altering the DATA statements at the end
of the routine.
10.11
Once the above routine has been executed, call this loading routine
instead of your standard one:
10.11
DEFFNload_template_window(temp_path$
10.11
,w_name$,font%)
10.11
SYS öWimp_OpenTemplateò,,temp_path$
10.11
SYS öWimp_LoadTemplateò,,m_space%,
10.11
space%,spaceend%,font%,w_name$
10.11
,0 TO ,,space%,,,,there%
10.11
SYS öWimp_CloseTemplateò
10.11
IF there% THEN
10.11
SYS öWimp_CreateWindowò,,m_space% TO
10.11
handle%
10.11
ELSE
10.11
ERROR 0,öWindow template not found!ò
10.11
ENDIF
10.11
=handle%
10.11
Repeated calls should load all the necessary windows from the
template file. The windows will behave as normal when created.
10.11
The Éload_templateæ routine takes a number of parameters. These are:
10.11
temp_path$ = String pathname of template
10.11
w_name$ = Name of window to be loaded from template
10.11
font% = Pointer to font table (defined in previous routine)
10.11
Beware! There are also other variables that need to be defined
earlier in the program! Firstly, you must have a general usage memory
area called m_space%. Secondly, you need a space for indirected icons
called space%. The end byte of this memory block must be in a
variable called spaceend%. This can be done by a few lines of code:
10.11
DIM m_space% 1024 (whatever size is necessary)
10.11
blksize%=800 (Again, the size of the block has to
10.11
fit the template)
10.11
DIM space% blksize%
10.11
spaceend%=space%+blksize%
10.11
I hope this has helped some programmers to understand how to get
outline fonts in windows. If anyone has done the Alan Senior WIMP
course, or an equivalent, and wants to go further into WIMP
programming, it would be advisable to buy the PRMs. These are very
expensive (I bought mine from NCS for ú105) but have got everything
in them. They are very obscure, though, and you need a lot of time
free to read through and understand them.
10.11
Artemis Entreri, Waterlooville
10.11
Using Termite Internet with Cable Internet - Recently, the cable
companies have introduced an offer to schools for Internet access via
the Cable Internet service. The annual price includes access,
software and unlimited calls to the point of presence phone number,
thus allowing schools to budget their yearly internet cost without
having to worry about unknown size of telephone bills. It should also
allow schools to provide access without the worry of trying to
administer a system which controls phone usage. The cost is very
reasonable, being ú100 for schools with less than 250 pupils, ú250
for those with 250 to 500 pupils and ú500 for those with 500 pupils
or more.
10.11
Of course, Cable Internet only provide software for Windows or
Macs(!). I have been evaluating the service and, as part of that, I
wanted to check whether it would work OK with Acorn software for
schools who wish to run it on Acorns. The good news is that it
appears to work fine. In fact, would you believe that, excluding the
time it took to get the relevant pieces of information from the Cable
Internet help line, it took me only about half an hour to have it up
and running using Termite Internet from Doggysoft, whereas it took me
over two hours to get the supplied Windows 95 software running!!
10.11
This was made possible courtesy of Termiteæs clever öCreate Script
Fileò option on its main startup panel which asks for the basic data
needed (easily available from the Cable Internet help line - just ask
them for each bit as Termite prompts) and then creates an appropriate
script file and adds Cable Internet, or whichever provider you are
creating a file for, to the list of providers in the configuration
options. After a month of testing, it has logged on successfully
first time every time bar none!
10.11
On request, Cable Internet also allows 5Mb of web space. Once asked
for, a user name (probably the email alias) and password allow you to
ftp (file transfer protocol) web pages and graphics etc, into your
personal web space. The Windows 95 software provided only allows you
to transfer into the root directory, so you have to download an
additional ftp utility to do more than that. However, Termite has ftp
built in and you can upload using all the drag and drop facilities of
RISC OS, so an entire web site of multiple pages and directories can
be selected and dragged into the web space directory with a single
öSelect Allò and drag and drop. This all works fine, as do deleting,
renaming etc of the files uploaded. A directory can only be deleted
on the Cable web space if it is empty, though, so its contents need
to be deleted first.
10.11
Itæs true that Termiteæs web browser needs updating, though I am told
that that is in progress and will happen ösoonò, but the fact that it
is easier to set up and use than Cable Internetæs own PC software
says something! For schools wanting to take advantage of the Cable
Internet offer, and use it on Acorns, this is a way I would
definitely recommend. I have provided NCS with the files needed for
use with Termite so that others neednæt create a script file, just
replace two default files with the ones provided - a half a minute
task. Then all you need do is choose Cable Internet as the service
provider, choose the appropriate local phone number, enter user name
and password, and you are off!
10.11
Mike Battersby, Kingston Schoolsæ IT Unit
10.11