home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1997
/
ARCHIVE_97.iso
/
text
/
hints
/
vol_02
/
issue_03
< prev
next >
Wrap
Text File
|
1995-02-16
|
21KB
|
541 lines
Å Fontsize problems? (Ed. got caught out on this one) With Claresæ
Sound and Graphics demo, when you start it up, it says it needs 44k of
fontsize, so I tried to re-configure with fontsize 6 on the basis that 6
times 8k = 48k. Now, as Iæm sure you will all realise, that didnæt work
because fontsize is specified in 4k chunks, not 8k or 32k.
Å Logotron printer dump Ö Logotron told one of our readers that there
is no printer dump for their Archimedes Logo. However, our Printkey Dump
program (issue 1.10, page 45) works fine.
Å RX80 dumps for Artisan Ö Clares originally said that Artisan
wouldnæt dump pictures on an Epson RX-80 and that the FX-80 was the
Ébase-lineæ printer as far as they were concerned. How-ever, they have
since produced a Éhelp-sheetæ of the pokes needed to convert the dump to
an RX-80.
2.3
The gist of the change is as follows;
2.3
If your printer will support CRT mode graphics, (ESC ö*ò,4) then use it.
If not then use ESC öKò for normal single density bit image mode, but
CRT mode gives a much better image and less distortion.
2.3
*LOAD ART6 10000
2.3
!&10EC5=&042A1B for CRT or =&4B1B00 for single density
2.3
*SAVE ART6 10000 +12FF
2.3
*SETTYPE ART6 &FF8
2.3
The resultant print produces oval circles(!) but can be triggered from
Artisan.
2.3
Å Monochrome displays on the 440 Ö Brian Cowan writes, I was lucky
enough to have one of the first release of 440æs which I used with one
of the Acorn colour monitors. I know that the resolution of these
monitors is nothing fantastic, but it seemed sensible to purchase them
together; at that stage I was not sure what connection standards were
used.
2.3
About six months later I had reason to use an ordinary mono monitor on
the 440, and imagine my horror when I found it did not work. Ordinarily
I would have sent the computer back to the supplier to have it fixed
under warranty. However, the machine was in constant use so we decided
to live with it, using only a colour monitor.
2.3
I now discover that there is nothing wrong with the 440!! When these
machines leave the factory they are not configured to drive standard
resolution mono monitors, they are set up for high res monitors. Inside
the case, on the PCB are some jumpers that must be set according to what
sort of monochrome monitor you want to drive.
2.3
At the north-west corner of the board is a plug called PL2. I think this
does nothing except carry some pin connector links. A little further
southwards on the board are some pins labeled LK13 and LK14. If you want
to drive a standard resolution monochrome monitor, you must take two
links from PL2 and place one on LK13 and the other on LK14.
2.3
Connection to a monochrome monitor on 440 machines is through two BNC
sockets on the back panel. One socket is marked SYNC and the other is
labeled MONO. For high resolution, both of these are used but for
standard resolution only the SYNC socket is used. Since this is a BNC
socket rather than the phono socket on the 300 series, you will have to
make up or purchase a special lead or a converter.
2.3
For those of you contemplating the purchase of a multisync monitor for
those extra modes etc. you will be happy to hear that the Archimedes
connect-ions are the same as those on PC machines. This means that if
the monitor comes with a lead, it will probably be suitable for the
Archimedes. This is certainly true for the Taxans that I use. Inciden
tally, concerning the Taxans, some have rather dull pictures. Has anyone
tried brightening them up?
2.3
Å Desktop calculator Ö öThe calculator on my desktop doesnæt respond
to the keyboard whereas your review of Arthur 1.2 said it did.ò So I
tried to work the calculator with the keyboard keys myself and it didnæt
seem to work. Then I realised that it wonæt respond until you enable it
for keyboard input by clicking on it with the mouse. The top bar then
goes red and itæs ready to take input from either the main keyboard or
the numeric pad, delete being the equivalent of clear. Easy when you
know how.
2.3
Å Conditional booting. If you have a boot file in the RFS on battery-
backed RAM, you may want to do some things when you first switch on but
not every time you do <ctrl-break>. You can achieve this by making it
conditional on the monotonic timer, i.e. the timer which is initialised
at switch-on and not reset in any other way. To read this timer, use SYS
&42 TO T% where T% then gives the time in centiseconds so you can say
that IF T%<200 (say) then do the switch-on bits and pieces ELSE do the
<ctrl-break> things.
2.3
Å CharDes fonts Ö If you have fonts produced by CharDes, you can
convert them for use on the Archimedes as follows. Enter 65Arthur and
type
2.3
*spool thin2
2.3
*thin
2.3
*spool
2.3
where thin is the name of the original font file and thin2 is going to
be the new file. Then use a text editor (such as the Master128æs öEditò)
and edit out the first and last line (i.e. the *thin and *spool). Then
resave as thin2 and settype it as &FF7 (BBC font). When you need it,
just type *thin2. If you do a *SHOW, you will see that the load and run
actions of a file type &FF7 is to *PRINT it Ö which is just what you
want.
2.3
Å Command files Ö In order to disable vdu output during a command file
e.g. the !boot file, try:
2.3
*echo ||U
2.3
...
2.3
...
2.3
*echo ||F
2.3
Two string escape characters are needed (as Iæve explained in a previous
tip) so that the final command executed is *echo |U
2.3
i.e. <ctrl-U>. This issues a VDU 21 which disables vdu output until a
VDU 6 is issued <ctrl-F>.
2.3
This is similar to the ECHO OFF command of MS-DOS. Indeed if the string
used is:
2.3
*echo ||U|H|Hoff
2.3
then all that is visible is öecho offò which explains why nothing else
is visible to the user and also hides the control code sequence used.
The öcompiledò string is then *echo |U<8><8>off. One side effect is that
two line feeds will occur so if this is undesirable a couple of reverse
line feeds can be incorporated with
2.3
*echo ||U|H|Hoff|K|K
2.3
Note that the use of single string escape characters means that the
cursor control codes will have immediate effect whereas the <ctrl-U>
will only be issued when the echo command is executed.
2.3
The double string escape characters are only needed for use with *Build,
if a text editor is used then only single characters are needed but the
control codes must be input directly, e.g. so they appear as inverse
video in TWIN, for those cases where the affect is immediate.
2.3
(Sorry if this sounds a bit confusing but the difference between two and
one |æs, and when to use which, is an entire discussion point on its
own. Perhaps this could be a short article Ö it is important whenever
command files issue messages etc.) Clifford Hoggarth.
2.3
Å Quick *COPYing and *WIPEing Ö When you enter a wild card *COPY or
*WIPE on a list of files such as TEST1, TEST2, TEST3, etc. you are
presented with a list of options at the end of the copy or wipe
statement
2.3
*COPY :0.TEST* :1.TEST*
2.3
Copy file adfs::0.TEST1 as adfs::1.
2.3
TEST1 (Y/N/Q/A)?
2.3
etc.
2.3
The option Y, N, Q and A mean the following :-
2.3
Y Ö means copy that file
2.3
N Ö means donæt copy that file
2.3
Q Ö means quick copy all file with the wild card specification after and
including that one with no further confirmation prompts
2.3
A Ö means abort from copying
2.3
The *WIPE option works in a similar manner but deleting.
2.3
Å Stereo Speakers Ö After reading the hint in Archive 1.2 about adding
a pair of Tandy amplified speakers, I promptly rushed off Éto townæ.
They had just run out of stock, because the ú25 price-tag was a special
offer. However Tandy were very helpful and ordered me a pair which
arrived within a week and which at ú29.95 are still excellent value.
However, a set of alkaline batteries was quoted as ú7.95!! Instead, a
surplus old calculator mains adaptor and two power plugs (30p each from
a local electronics shop) provided a cheaper source of power. If you
donæt have a spare one, a new power supply from Rapid Electronics costs
less than ú4. The magic moment arrived and I switched on! The buzz from
the speakers was horrific!, but soon drowned by mayhem and destruction
from Zarch, which in turn was swamped by the dulcet tones of Éher
ladyshipæ complaining from the other end of the house about the volume!
2.3
Back to the drawing board Ö two capacitors, recovered from an old tape
recorder smoothed the power supply output and banished the buzz. The
solution to the lack of volume control was to add two potentiometers.
Whilst I was at it, I decided to wire the volume controls into a socket,
so that Zarch could be enjoyed at a reasonable volume late at night
through a pair of personal stereo headphones as well as through speakers
at a more civilised hour. An houræs work, a couple of pounds and I now
have glorious stereo sound, at a reasonable volume!
2.3
The diagrams below show the set up. A twin pot could be used instead of
two single ones, so that both speakers are controlled from one knob. Any
value pot from 100 ohms up to about 4.7k ohms will work, but 100 ohms is
ideal, though 470 ohm pots are easier to obtain. Logarithmic pots are
best, but linear ones work fine and are again are easier to obtain. The
big capacitor can be anywhere in the region shown (2500 microfarads/30V)
Ö the small one takes out the higher frequencies and again its value
(220 microfarads/16V) is not critical.
2.3
Itæs worth noting that the speakers cut off only after a minute or two
if there is no sound being produced. Presumably there is a small
capacitor inside which needs to run down first. Similarly, they need a
certain minimum signal for a very short time in order for them to switch
back on. David Kent
2.3
Å Ultra-cheap sound amplification Ö Maplin Electronics (0702Ö554161)
have an amazing offer including a pair of walkman-type headphones AND a
pair of monitor speakers for just ú3.95! I donæt know how good they are,
but at that price, you canæt go far wrong. (Oh, thereæs a handling
charge of 50p and a postage charge of 50p Ö still, itæs not bad.)
2.3
Å View öOCò Command Ö In View B3.0, one of the highlights can be set
to 27 instead of the normal 128 for underline and 129 for emphasise. In
doing this, commands may be made directly to the printer as in the
Wordwise OC command. For example, to set highlight 1 to 27
2.3
<Shift-f8> HT<return> 1 27 <return>
2.3
On pressing <f4> (underline) the next character will be sent to the
printer as a command, i.e. ShFn4x1(-x1) will turn on NLQ mode (on some
Epson compatible printers). This system seems to work for most commands,
but some commands need an ASCII ,1 so to get round this set highlight
key 2 (emphasise) as 1 and type ShFn4wShFn5 (-x*) to turn on double
height for example. This does have the disadvantage that things canæt be
turned on and off in the same line as you have to set highlight 2 back
to 0 to turn it off.
2.3
Å Two ARM Code Assembly Macros Ö (Richard Averill) Ö Here are two
useful macros for use in the BASIC V ARM assembler. They both use the
same method of loading 32-bit words into a specified register, which is
detailed below:
2.3
Originally, I had the idea that if I used the following piece of code:
2.3
LDR <reg>, [PC, #-4] !
2.3
EQUD <value>
2.3
then the processor would load the value and jump on to the next
instruction. However, what actually happens is that the value is loaded
and the ARM tries to execute the value as an instruction. If the high-
byte of the value is zero, then this will not cause a problem, but it is
not advisable to use routines that are not totally water-tight.
2.3
Here is the improved code:
2.3
LDR <reg>, [PC]
2.3
MOV PC, PC
2.3
EQUD <value>
2.3
which only takes one more word of code and works all the time. The MOV
PC,PC is there to make sure that the ARM executes the instruction that
is in the pipeline, and not the instruction in <value>.
2.3
Using these ideas, I have developed two useful routines detailed below:
2.3
DEF FNload(reg%, val%)
2.3
[ OPT opt% AND &E
2.3
LDR reg%, [PC]
2.3
MOV PC, PC
2.3
EQUD val%
2.3
] : =opt%
2.3
DEF FNadr(reg%, adr%)
2.3
[ OPT opt% AND &E
2.3
FNload(reg%, adr%-P%-20)
2.3
ADD reg%, PC, reg%
2.3
] : =opt%
2.3
As you can see, the macros can be used as any other instruction in the
assembler as such:
2.3
MOV R0, #123
2.3
FNload(1, &12345678)
2.3
FNadr(2, pointer)
2.3
SWI öOS_Anythingò
2.3
A demonstration program is given (on the program disc) to illustrate the
use of these macros.
2.3
Å Running ViewPlot under 65Arthur Ö Richard Averill Ö Listed here are
the changes needed to make ViewPlot Éharness the power of the Archi
medes!æ. They will tidy the programs up, allowing ViewPlot to run in any
mode and to print and save screens. A *Exec file of these changes is
provided on the monthly disc.
2.3
To use this file, transfer the ViewPlot disc onto ADFS into a directory
such as ÉViewPlotæ. You can either create a text file of these commands
(with *Build or a text editor) or you can type the commands in yourself.
Either way, you should make sure that you are in the ViewPlot directory
when you try to convert the programs.
2.3
*|Running ViewPlot under 65Arthur.
2.3
(C) Richard Averill, 1988.
2.3
*BASIC
2.3
LOAD öViewPltò
2.3
390
2.3
SAVE öViewPltò
2.3
LOAD öV__Dò
2.3
730 IF M=248 OSCLI(öScreensave Imageò)
2.3
:PROC2(R%)
2.3
SAVE öV__Dò
2.3
LOAD öV__Mò
2.3
1140 DEF PROC0:VDU 28,0,23,39,5:CLS
2.3
1190 REPEAT
2.3
1200 INPUT öEnter screen mode (not
2.3
text) ? ö M%
2.3
1210 UNTIL FNcheckmode(M%)=TRUE
2.3
DELETE 1220,1290
2.3
3000 DEF FNcheckmode(mode%)
2.3
3010 LOCAL col$,ok%
2.3
3020 ok%=FALSE
2.3
3030 IF mode%=0 OR mode%=8 OR mode%=12
2.3
OR mode%=15 OR mode%=18 OR mode%=19 OR mode%=20 THEN C%=16:ok%=TRUE
2.3
3040 IF mode%=1 OR mode%=4 OR mode%=9
2.3
OR mode%=13 THEN C%=32:ok%=TRUE
2.3
3050 IF mode%=2 OR mode%=5 OR mode%=10
2.3
THEN C%=64:ok%=TRUE
2.3
3060
2.3
3070 col$=ö04ò
2.3
3080
2.3
3090 IF mode%=0 OR mode%=4 OR mode%=18
2.3
THEN col$=ö04ò
2.3
3100 IF mode%=1 OR mode%=5 OR mode%=8
2.3
OR mode%=19 THEN col$=ö15ò
2.3
3110 IF mode%=2 OR mode%=9 OR mode%
2.3
=12 OR mode%=20 OR mode%=10 OR mode%=13 OR mode%=15 THEN col$=ö2ò
2.3
3120 IF ok%=TRUE THEN OSCLI(öLOAD Colò
2.3
+col$+ö 2600ò)
2.3
3130 =ok%
2.3
SAVE öV__Mò
2.3
LOAD öV__Pò
2.3
250DATA 0,0,0,0,0,0,2,4,4,4,2,16,8,1
2.3
,16,0,0,0,2,2,16,4,1,16,0,0,0,2,
2.3
1,16,0,0,0,0,0,0,2,8,2,2,4,4,2,
2.3
2,16,2,1,16,2,8,2,2,8,2
2.3
1740DEFPROCJ(b%):e%(b%)=0:ONM%+1GOTO
2.3
1770,1810,1880,1880,1770,1810,1880, 1880,1810,1880,1880,1880,1880,1880
2.3
,1880,1880,1880,1880,1880,1770
2.3
,1810,1880,1880,1770,1770
2.3
2070DEFPROCE:FORb%=1TO8:e%(b%)=b%?
2.3
(&2608+((a%-1)*2+a%-10)*8-1):ONM%+1
2.3
GOTO 2110,2150,2200,2200,2110,2150,
2.3
2200,2200,2150,2200,2200,2200,2200, 2200,2200,2200,2200,2200,2200,
2.3
2110,2150,2200,2200,2150,2150
2.3
SAVE öV__Pò
2.3
Å Cheap colour monitors Ö Peter Sykes bought a Commodore 1084 monitor
which seems to be identical to the Phillips 8833 but cheaper. He got his
from Eazyprint in Staines, Middlesex for ú240, around ú20 less than the
cheapest he could find the Phillips 8833. (Thereæs an Acorn one for sale
in the small adæs, but there must be other folk by now who are up-
grading to multi-syncs and have monitors for sale Ö send in your small
adæs folks Ö no charge.)
2.3
Å Use of Archimedes on Econet Ö Copying ADFS format discs to NET and
vice-versa, no utility is needed as Archimedes has it all built in:-
2.3
*COPY -adfs-$.* -net-$.whatever.* QRC
2.3
Here ADFS is the source, NET is the destination. The Éwhateveræ is the
chosen destination directory, or directory path (e.g. replace Éwhateveræ
with Éfred.mary.utilsæ) The * is to indicate all files. The Q indicates
QUICK copying using all available RAM. This damages resident programs
but considerabley speeds the copying process. It is also almost
essential if using early versions of the Econet Software Modules (NETFS,
ECONET) due to bugs in these which cause ÉNot Listeningæ messages. Later
versions do not suffer this. The R to indicates recursive copying of
sub-directories. The C turns OFF confirmation so that copying occurs for
all files without question.
2.3
Simple modifications to the command line allow copying in the reverse
direction.
2.3
(This was sent in by Michael Ryan, editor of the Econet User Group
Magazine (NEUS) which carries regular articles on Archimedes on the
network (and many less esoteric matters as well). We have also been
licensed by Acorn to provide free upgrades to Econet software modules
for those unable to obtain them elsewhere. Econet User Group, Balkeerie
Cottage, Eassie by Forfar, Angus, DD8 1SR.)
2.3
FWP Hints & Tips
2.3
compiled by Mike Hobart
2.3
Å Changing default drive Ö those of you with dual drives may want to
be able to get FWP to default to looking for data on drive 1. To do
this, all you do is load $.library.1wp and change the line that sets up
the documents directory to:
2.3
*set FirstWordPlus$Docs :1.$.
2.3
Å Saving to a fresh disk Ö If you need to save your work onto a fresh
disk, you may have difficulty in persuading the save to work: you get
silly messages about the disk being write-protected and directories not
being present. This is very frustrating if you have just written the
first chapter of your bestseller. Try öSave as...ò, taking special care
either to see that you are in the correct directory as specified in the
directory box at the top of the save window or create a new file in the
root directory by clicking repeatedly on the X icon until you are left
with only a ö*ò. Thanks to Peter Tettmar, on whose solution is differ
ent, but less convenient as you have to anticipate the problem!
2.3
Å Form feeds in the wrong places Ö Edit your printer driver (the öhexò
directory one) to inactivate the övertical tab to lineò feature. This is
done by placing a ö*ò at the beginning of the line (line no 4, which
should now read *4, 1B,42,80,0,B or near). If you have serious troubles
with irrational formfeeds, try setting the CONFIGURE IGNORE of the
battery-backed RAM to prevent the computer ever sending to crucial code
to the printer. (Thanks to David Adamiak and from him to GST Holdings).
2.3
Å Use of IBM fonts Ö Steve Jones points out that there can be
advantages in using the IBM font set, if your printer supports it. The
monthly disk con-tains his very full instructions and programs. The main
reason for using the IBM fonts is the availability of certain symbols
for maths and graphical characters. These can be especially useful for
designing forms.
2.3
Å Graphics problems (e.g. that white is printed grey etc.) can be
cured by preparing the graphics in 1st Word palette. For Artisan, copy
1stwordæs Resources.1wp.!palette as artisan.1wppal (or what takes your
fancy) on the Artisan disk, then boot up Artisan, grab the disk ikon and
finally select the new palette. The result is not artistic, but a quick
roller brush over the background with white, followed by the artwork in
e.g. black produces a picture you can import and have printed correctly.
The reason this works is that the graphics dump routine in 1st Word
assumes the use of the programæs own palette, or at least that it is
trying to produce a paper version of what you see on the screen. It is,
incidentally, quite an intelligent and quick dump, which checks to see
if there are pixels to print before printing a line, and issuing a
linefeed if not.
2.3
Å Conversion from WWPlus Ö The following hint might be useful to
people still trying to convert WW+ file to 1WP. The convert program
published in Archive does a wonderful job. However, I found it a bit
irksome having to edit out all the ÉUSæs and ÉUEæs etc which are left
after the program has dealt with the green and white embedded commands.
(This just goes to show how quickly we start to take things for
granted!!). I also found that it was impossible to reformat the text to
a new line length. The latter problem seemed to be that 1WP ended lines
with &0E, whist converted WW+ files ended with the last letter of the
last word on the line.
2.3
The solution to both problems is as follows:
2.3
1 SPOOL out the WW+ file, using Option 8 (This removes all embedded
commands and centres text and produces indents and TABs)
2.3
2 Reload the spooled file and use Search & Replace to change all
double returns to @@ (or any other unused combination of letters)
2.3
3 Change all of the remaining single returns to <space>-return
2.3
4 Change all of the @@s (or whatever) to <space>-return-return
2.3
5 SAVE the modified file using Option 1
2.3
6 Run the SAVED file through the convert program
2.3
The effect of 2, 3 and 4 is to save the paragraph breaks, but end all of
the lines with a space. The result is a file with no extra Éremainsæ of
embedded commands, and which will reformat correctly in First Word Plus.
2.3