A Stroll Around RISC OS
A Stroll Around RISC OS
RISC OS
on the
Raspberry Pi
The Desktop
At first sight it loo(s familiar / there+s a picture on the screen, and a %ar across the %ottom. )ut differences soon %ecome apparent. In &indows or -inu., if you were to, say, open a we%$%rowser window, or a folder, there+d %e something on that %ottom %ar. !pen two te.t files in *otepad, and there would %e two things on that %ar, one for each. *ot on RIS !S. !n &indows, you+ve got that system tray on the right, where (some of) the things that are running appear, and the start %utton and 2uic($launch things on the left for getting things going. !n RIS !S 3ou don+t. !n the right, if some app is running / a we% %rowser or 14ap or 1'raw / then there+ll %e an icon (pro%a%ly1 $ more in a later lesson1) 5rom there you can open a new document, or configure your %rowser. !r the switcher (far right) lets you do things li(e switch off. !n the left you+ve got what may loosely %e called facilities. 6ere you+ve got access to storage devices / 's, networ( drives, hard discs, floppy discs, a Ram disc, and printers / and the Apps that the system (nows a%out. A minor note here. If you left$clic( (or right$clic() on that Apps icon you+ll see that everything %egins with an e.clamation mar(. Apart from normally calling that a pling, you+ll discover that 0ust a%out all apps have that. It+s very important, and something that separates RIS !S from all the rest. )ut we+ll get to that shortly1 And the usual way of identifying the mouse %uttons is Select for the left %utton, Ad0ust for the right %utton, and Menu for the middle %utton (or the scroll wheel which acts as a %utton if you press it) &hen I first got a three$%utton mouse I used a
magic$mar(er to la%el them S M A. It was not lost on me that my daughter at a few months old was on a %a%y formula called SMA &indows and -inu. use the two mouse %uttons differently / the right %utton is used for menus 2uite often. 6aving a separate menu %utton on RIS !S means the right %utton can %e used for more su%tle things. &e+ll see some of them shortly.
Filer Windows
!7, lets loo( a %it deeper. lic( on one of those storage icons, try the one that loo(s li(e an S' card. A window opens as you+d e.pect, with several folders displayed. Try dou%le$ clic(ing on one of them / lets try 'ocuments. Inside that, try Images, and inside that, Artwor(s. 3ou+ve got four windows open. &indows doesn+t normally do that / though you can set it to do so / it normally reuses e.plorer windows. RIS !S opens each folder in a new window. )ut suppose you don+t li(e this. Shut the last three down (uh oh1 &here+s the lose icon81 Top left1) *ow Ad0ust$dou%le$clic( (right mouse %utton) on 'ocuments, then Images then Artwor(s. Is that what you wanted8 )ut how do you go %ac( up the tree8 9asy / Ad0ust$clic( the lose icon. That closes the window, %ut in addition opens the parent. That wor(s on most windows / close a document window with ad0ust on the lose icon, and the filer window for the folder it came from $ or was last saved to $ will open. (This doesn+t always happen / we+ll come across one that won+t in a minute1) !r try Menu$clic( somewhere on the window, and you+ve got a menu / choose !pen parent. And that+s %rought up another difference. 5or menus, &indows has a %ar across the top of each window. RIS !S doesn+t / it uses the menu %utton. &hen you get used to it, it+ll %ecome second nature, %ut can %e disorientating. Another difference / there+s no way to minimise a window. )eside the title %ar at the right hand side, there+s a %utton to ma.imise the window, 0ust as on &indows, and on the left there+s a %utton to close the window. There+s also a %utton in the top left corner, which you can use to send a window to %ehind all other windows on the des(top, which &indows won+t let you do, and we+ll find out in a minute what use it is. )ut you can+t minimise a window. &hat you could do, if you had set things up that way is :iconise; a window. 3ou would have another %utton ne.t to the ma.imise %utton, which would close the window and put an icon on the des(top. )ut we haven+t got that far yet1 !h and another thing. If you drag something from one window to another, you+ll always get a copy, not a move. &indows gives you a move if it+s on the same drive, and a copy onto a different drive. If you want a move, hold down shift before you start the drag, whether it+s to the same drive or a different one.
'id that surprise you8 'id you e.pect that window to pop to the front8 &ell it won+t1 )ut if you try typing into it, it+ll still wor(. If you can see some of the title %ar, you+ll see it+s gone yellow / that means it+s got input focus. "ra% the title %ar, it+ll come to the front. lic( the top left icon, it+ll go to the %ac(. )ut you can still type into it $ try it. *ow try to close it (< icon, top left) 3ou+ll get a menu$window, giving you the option to save it (you don+t want to, %ut you could), a name field and an icon that loo(s li(e a pen on paper. 3ou could have found that window %y pressing 5= or %y menu$clic(ing somewhere over the window and going sideways from Save / it does almost the same thing. There are a couple of things you could do. Save it under the original name and place $ clic( >Save and close> $ or type something new into the name field, or you could save it somewhere else. Something to note. #nli(e &indows, if you try to highlight the te.t in an icon, and then over$write it, it won+t. 3ou+ll have to delete the te.t first with %ac(space or delete. !ne more important thing. That name has the folder names and the file name separated %y full stops (periods to #S readers) instead of %ac($slashes or forward$slashes. That is true also in the title %ar of the file. In fact loo(ing at that, S'5S? points to the filing system, ?RIS !S means the disc under that filing system, @ is the root, and the rest is the full path in that. 'irector is the leaf name, under which it+ll %e saved, where$ever you save it. Aust clic(ing >Save and close> uses the whole path. 5inally, you+ll also see if you+ve altered the file, that there+s an asteris( at the end. This 0ust means that it hasn+t %een saved yet. To save it somewhere else, drag that pen$and$paper icon to the folder you want it to go in. And that+s something new to a &indows user / you need to %e a%le to see the folder you want to put it in. Actually that+s not 2uite right, you can drop it onto a disc on the icon %ar, and a window will open for the root of that disc. !pen the S' card again, and go into ,u%lic. *ow drag that icon onto the ,u%lic window.
*ow try dragging the scroll %ars with Select. Aust as you e.pected. Try with Ad0ust. #sing Select (eeps the pointer on the scroll %ar (&indows allows the pointer off the scroll %ar, %ut ignores the a.is it+s not controlling) 6owever Ad0ust turns the action into C', so you can use one scroll %ar to go anywhere on the drawing. !ne last thing with the )oot6ow drawing. If you close it with ad0ust, the directory it came from won+t automatically open. This is one of the few places where the system falls down1
File T pes
!(ay, how does RIS !S (now that the 'irector file was a te.t document, while that )oot6ow file was an 1Artwor(s file8 May%e you aren+t worried %y that, %ut it+d %e nice to (now. After all, on a &indows machine every file has a three$character e.tension, though that may %e hidden, and that tells &indows what it is. So .t.t means te.t, and .e.e means e.ecuta%le, and so on. &hat does RIS !S do8 It+s down to the way RIS !S stores things, as against what &indows does. Instead of a three$ character file$type e.tension in the file$name, RIS !S uses a three$ he.$num%er file$type, stored separately. 3ou can+t easily see that (though if you choose 'isplay D 5ull info from a filer$window menu, you can), %ut you can alter it, and RIS !S can use either the te.tual interpretation or the he. num%er. If you menu$clic( over the file you+ve saved in ,u%lic, and go to info, you+ll see it+s a te.t (fff) type. "o to Set type, and change what it says to ff% (and Return). Info will say it+s a )ASI file. 'ou%le$clic( it and you+ll get an error1 If your &indows machine is set up to hide the e.tensions, you could have a folder containing a te.t$file called 5red, and a picture called 5red, and a spreadsheet called 5red E ThatFs %ecause they+re 5red.t.t, 5red.0pg, 5red.ods E The same thing on RIS !S though / they would all %e called 5red, with different file$types, and RIS !S wouldn+t li(e it. &hat you could do is call them 5redGt.t, 5redG0pg, 5redGods E RIS !S (nows what Gt.t and G0pg mean, %ut not Gods, so the first two will open correctly, %ut not the last. (Actually you can open it in 1Spar(plug $ it+s a Bip$file)
going on in the machine. Menu$clic( and clic( choices, and you get the configuration window. !r you can dou%le$clic( the 1)oot folder in the S'5S??RIS !S.@ window. 3ou remem%er I mentioned a%ove that you could have an iconise %utton on windows8 lic( on the :windows; icon (single clic( here / it+s not a filer window even though it loo(s li(e one) and tic( the %o.. If you want filer windows to have small icons %y default, clic( the 5iler icon and choose that from the drop$down menu. #nder 'iscs is where the RAM disc is ena%led. I find a ramdisc of HIM) is a%out right for me, %ut I do strange things. I had an app that ran on three or more Risc , s (the last %ut one of the classic RIS !S machines) and controlled each other over the networ(, sharing their ramdiscs. )ut I digress. 3ou want a different picture on your des(top8 Try Screen / no1 &indows8 *o1 Actually it+s under ,in%oard. 'rop a picture on here, and it+ll wor(. )ut if it+s on a remova%le disc, ne.t time it %oots it may not %e a%le to find it. So where would %e a good place to (eep your picture8 Actually what+s happening, is that a file called ,inSetup is %eing altered. *early everything in RIS !S is done with a script, generally %y an !%ey file, with type Jfe%. This one says
Backdrop -S Boot:^.Documents.Images.Backdrops.Abstract -Colour &779677 -!e"tColour &
so a good place to (eep your picture would %e there. )oot? is a path that was set up during the %oot$up, and the K means up one level. -oo( on the S' card, loo( in 'ocuments.Images, you+ll find it1
Its icon tells us it+s an !%ey file, and if we shift$dou%le$clic( it, we can read it. Most of the stuff in hoices can %e read in the same way. In other versions of RIS !S there hoices tree is more complicated, with 6ardware, 'efault, and #sers sections. The idea is the same, though. ,art of the %oot se2uence is reading and acting on the files in the ... hoices.)oot directory, and its su%directories, and the one called Tas(s is dealt with after the des(top starts. If you want to do something odd, 2uic( and dirty, you can put something here. 'on+t %e surprised if you %rea( something, though1
Appli!ations
&hile we+re into interesting things, try this. !pen the Ramdisc root folder $ clic( on its icon on the Icon %ar. If you haven+t yet set up a Ramdisc, then go to onfiguration (either dou%le$clic( 1)oot, 'ou%le$ clic( the icon on the des(top or Menu$clic( on the switcher and clic( hoices...) clic( 'iscs and tic( the 9na%le %o.. Menu$clic( over the folder window and choose *ew directory, and give it a name / I+ve called mine :asd; for :all singing and dancing;. Then open it. *ow we need to put something in it. )ac( in Apps, run 1,aint, and clic( on its icon to open a new sprite$file. Ma(e the siBe something li(e =C L =C, and give it the name 1asd. *ow draw something in the window that appears. Menu D 4oom may ma(e it easier. lose that window, and save as 1Sprites in the asd folder $ menu$clic( over the window and go right from save, type >1Sprites> into the name, drag the icon to the asd folder window. Side note? &indows calls them +folders+, RIS !S calls them +directories+. -inu. prefers +directories+ %ut there are references to %oth. I find it+s 2uic(er to type +folders+. )ac( to the root of the Ramdisc, and rename the folder 1asd. The window that showed what was inside asd disappeared / not surprising as that no longer e.ists, %ut what you may not have %een e.pecting was that the icon for 1asd has changed. ,retty isn+t it1 &ell, may%e not depending on your artistic talent. If you+ve had a loo( in other applications, you+ll have noticed there are a couple of other files in most apps. 3ou+ll have seen one called 1)oot, and another called 1Run. )oth will %e o%ey files, and if you loo( at them (shift$dou%le$clic(), they have things li(e Set lose#p@'ir M!%ey@'irD $ this is from the application 1 lose#p in the Apps folder of the S' card. !%ey files are 0ust scripts, te.t files that do much the same as their cousins in -inu. and &indows. They+re parsed %y the !S and tell it what to do. Aust a%out anything you could do in a tas( window you can do in an o%ey file, plus there+s a system varia%le set up while it+s %eing run called !%ey@'ir. 3ou can use that to set up other system varia%les, as here, or you can set up any other varia%le you li(e. They can then %e read %y a running program to vary how it wor(s. &e could write our own 1)oot file, and we could set up a varia%le AS'@'ir to point to our own directory with a line such as
I+ ,ASD&D)r-.// t(en Set ASD&D)r ,%be0&D)r-
Then, if we were to move our application to a different folder, or a different disc, our varia%le will point to the right place. If we+ve got two versions in different places, the first one seen sets our varia%le. 'ou%le$clic(ing our folder would run the 1Run file $ if there was one $ which wouldn+t have the test at the start of the line, so our varia%le would point to the running folder.
Iconspr)tes ,ASD&D)r-.'Spr)tes
)ut there+s more to )) )ASI than that. Since that time, )ASI has grown, and is capa%le of fully multitas(ing applications, interacting with the !S and with hardware. )ut where to start8 There are a num%er of ways to %egin programming in )ASI , depending on what you want to do. If you wish to loo( at or may%e modify an e.isting program then shift$dou%le$clic(ing it will open
it in your favourite te.t editor, and will save your changes as a program for you to run. 3ou can write your own from scratch as well, 0ust ma(e sure you set its filetype to )ASI %efore saving it $ menu$clic( over it and choose set type. 3ou could open a tas( window, and at the O prompt, type )ASI . To get %ac( to the O prompt, type P#IT !r press 5HC. This ta(es you out of the des(top, and again gives you a O prompt, where you can again type )ASI . P#IT gets you %ac( out, and return on an empty O prompt gets you %ac( to the des(top. 5or those who desire a more hard$core retro e.perience, you can modify one of the files in 1)oot. At the end of S'5S??RIS [email protected])oot.#tils.)ootRun is a line
4C(o)ces:Boot.Desktop
hange that line %y putting a pipe character ( Q ) at the front $ that+s a shifted %ac(slash on a #7 (ey%oard $ so that it+s treated as a comment. 3ou will find when you re%oot that you+re in a small window, with many of the des(top facilities missing. There+s still things going on in the %ac(ground, and to get rid of those re2uires delving into the %oot se2uence $ things that have %een put there to prevent you doing what you want to do1 )ut there are ways round it1 All you need to do is loo( at the entire %oot structure and disa%le what you don+t want. RIS !S is %rea(a%le if you try hard enough, nothing is hidden1 6AR9 5#*1