RISC OS released on Raspberry Pi

Has any one down loaded the new verison of risc os dated 11/01/12 RC6.The last version was fast this one steaming.Does any one know if Elite will be ported to Risc os for the pi I remember playing it on the spectrum and the arc version is reported to be so much better. I tried to Load it on to an old A3010 but couldn't get it to work

bob_binz wrote:Opening the BASIC file only seems to work by shift double clicking. If I open a !StrongED window, and drag a BASIC file onto it from the BASIC.Routines folder, the title bar says "Textfile *". There is no syntax highlighting either, which there is when I shift double click.

When you drag a file to an open StrongED window then you are _inserting_ the file into an existing text in that case the mode is not changed to BASIC. The filename isn't changed either, here it's "Textfile *" as it's a new, unsaved, file (so no full filename) with the "*" indicating that the file's been altered.

You can change the mode manually by clicking Adjust (right button) over StrongED's iconbar icon and selecting 'BASIC' from the menu.

You can also open files/directories by dragging them to the iconbar icon. When it's a directory then all files in it (and in any subdirectories) will be loaded. If you hold down Ctrl whilst dragging a dialogue box will be opened allowing you to filter which files will be loaded, eg only BASIC files or all files called "Foobar".

If you're looking to find your way around RISC OS, Burngate has made a really, really neat PDF guide for neophytes. We'll be publishing that on Monday as well, because stuff like the magic of F12 and the middle mouse button appear to have some people scratching their heads!

I'm slightly confused by the problems with GCC unpacking, but I think there might be another missing piece. When you drop a directory over another directory of the same name, the contents are merged. So let's say you double click a Zip called gcc-core-bin/zip. That has an application inside it called !GCC. An application is the same as a directory starting with ! (pronounced 'pling'). So to unpack you drag !GCC to a directory viewer on your SD card - let's say it's the root directory $, so you now have $.!GCC

Some applications are supplied in pieces, so you can choose which parts you want. GCC is like this. That means that a piece may not have enough files to be a fully-functioning program on its own, it may require files from another piece. So you downloaded another Zip called gcc-g++-bin/zip (the C++ compiler). The C++ compiler doesn't include the C compiler that it also needs. So to install it, you first unpack gcc-core-bin/zip as above. Then you take the !GCC from gcc-g++-bin/zip and drag that on top of the !GCC with is now in the root of the SD card. The Filer will then merge the two directories - adding the new files to sit alongside those you unpacked from the previous Zip. (Actually, it doesn't matter where you drag it in the Filer window, the action is the same). If you do this for those two zips mentioned above you should have a full GCC install (you don't need the source code archives, and the system components are already installed on the Pi distro)

For another new user guide, there's a file called welcome/html that on the backdrop of the RISC OS distro, that you can double click to read more about how everything works.

pygmy_giant, if you get internet on your Pi sorted somehow, there's another approach you can use.

Run PackManClick Menu (middle mouse button) over the PackMan iconbar icon, go to Advanced -> SourcesAdd a URL of http://www.riscos.info/packages/pkg/autobuilt and make sure 'update lists' is tickedWait while it downloads a new package index.

That will include the GCC packages that I omitted from the distro because I was afraid of them hammering slow SD cards. If you have a fast(er) SD card you can give it a try - Select (left mouse button) click the PackMan icon, find GCC, click the green tick icon (top left of the toolbar), click OK, then leave it to install (may take a long time).

Note that some of the other packages on riscos.info don't work on the Pi (which is why I also excluded them from the 'official' list) but the worst that'll happen is you get an error message if you try and run them, so it can't go too wrong.

bob_binz wrote:... I've been through Burngate's document which is really helpful, but I think it was with a different version of the OS because some things are different (i.e. there is no Example folder in BASIC) ...

Sorry

Every time I thought I'd got it right, they went and moved things round

When things settle down I'll maybe do a revised edition. But don't hold your breath

bob_binz wrote:... I've been through Burngate's document which is really helpful, but I think it was with a different version of the OS because some things are different (i.e. there is no Example folder in BASIC) ...

Sorry

Every time I thought I'd got it right, they went and moved things round

When things settle down I'll maybe do a revised edition. But don't hold your breath

No need to be sorry, its a fantastic resource and I got plenty of guidance from it. I'm sure it takes a lot of effort to keep it sync'd to each release. Thanks for your efforts.

pygmy_giant wrote:I also downloaded Arch Elite but it has 26-bit components so would require an emulator to run on the Pi. Not sure which one though.

That would be Aemulor, which is expected to be released shortly. (You'll have to pay to use it on the Pi, though.) In the meantime, you could try ArcEm, which emulates 1980s era hardware, but unfortunately it doesn't come with RISC OS ROMs, and I think the only (legal) source to obtain that from is the £10 Classic ROM Collection CD.

I don't know how modern ArcElite is, and if it's too ancient then Aemulor may not be enough, but I'd be inclined to wait for the release of Aemulor.

Regarding your GCC problems, I think I might know what's going on.

As previously mentioned, RISC OS applications are self-contained directories, unlike anything on any other OS I know of. Shift-double-clicking on them will allow you to browse the contents. Certain filenames in the root of an application directory have special meanings. One of these, !Run, you've already encountered - it's the only compulsory one, and is executed when you double-click on the directory without holding down Shift. Another one is called !Sprites (which must be filetyped as a sprite), which contains the picture used to represent the directory - if this isn't present, it is given a default icon of an A made up of cogs. (You may also see !Sprites22 and !Sprites11 - if present, these hold higher resolution icons.)

The pertinent one in this case is called !Boot, which is automatically run whenever you open the directory containing the application. Or at least, that's what happens in theory; in practice, RISC OS executes those files as little as possible to prevent directories containing large numbers of applications taking ages to open every time. (In the days of 8MHz processors, this was a real problem.) I'm still not quite sure how its optimisation and 'I've seen this app already' algorithms work, but it is very possible that it tried to execute the !Boot file of the copy of !GCC which you trashed by unzipping it on your PC, failed, and then didn't attempt to execute the !Boot file of the working copy of !GCC in the zip when you opened the directory containing that a few seconds later.

By the way, !GCC is an entirely command line-based application, so there isn't really anything sensible for the !Run file to do. I believe it just contains a command to execute the !Boot file again (which is useful in the aforementioned circumstance that RISC OS didn't automatically execute the file itself because it thinks it's already seen this application when in fact it's a different one). The !Boot file sets a number of command aliases which allow you to type "gcc", "make", etc. in a TaskWindow (Ctrl-F12) without having to worry about where the gcc and make binaries are stored on your SD card (inside the !GCC application directory, as it happens). If it didn't do that, then you'd have to enter the full pathname every time.

Of course, this does have the disadvantage that you have to have opened a directory containing the !GCC application before you can use its commands. Fortunately, you can automate this process: middle-click over the raspberry icon (bottom-right corner), left-click on 'Configure', click on 'Boot' in the window which opens (the same one which our correspondent above regards as a 'parallel universe'), click on 'Look at'. Now drag and drop your copy of !GCC from its filer window into the pane on the left and click the yellow button (I think it's marked 'Set', but can't check ATM). Its !Boot file will now be automatically executed when the machine starts up.

tl;dr version: The moral of the story is:

NEVER EVER UNZIP A RISC OS PROGRAM UNDER WINDOWS, MAC OR LINUX!

You can fix your problem by deleting the copy of !GCC which you broke by doing this and unzipping it under RISC OS instead. If in doubt, reset the computer after doing this.

And now, some general advice for all those people who are having trouble downloading from NetSurf or installing with !Store: RISC OS uses drag'n'drop a lot - way more than any other desktop environment. If you see a file icon and you're not sure what to do with it, generally speaking you're supposed to drag it to a filer window. This is standard practice across all RISC OS applications - e.g. if you click on StrongED's 'Save' button, you'll also see an icon which you're supposed to drag to a filer window. This is how you let RISC OS know the location you want to save in. The save function in most other OSes will open a window which requires you to navigate an entire directory structure in order to choose your location, but here the directory has to be opened externally to the application.

For a similar reason, RISC OS has no concept of the 'Open' window. All applications load files by dragging and dropping them from the filer to that application's icon on the icon bar. If the application has claimed the filetype, you can simply double-click on it (e.g. NetSurf claims the HTML filetype, which allows you to double-click on 'welcome/html', but loading NetSurf and then dragging and dropping the file from the Pinboard onto its icon would also work).

The icon bar (which was later poorly ripped off by Apple for their 'dock', and even more poorly imitated by Microsoft for their 'taskbar') is a concept which many newbies find confusing. An application does not need to have windows open in order to be running! The very first thing any app does (assuming it's a desktop program) is add its icon to the icon bar. Then, if you so desire, you can open its windows. (This avoids the need for, say, StrongED to create a blank text file every time you load it, just for the sake of having at least one window on the screen, unlike Notepad or emacs or any number of other foreign text editors. What's with that, anyway? Terrible OS design.) For the same reason, a program does not quit just because all its windows have been closed - to do that, you must middle-click on the icon and select 'Quit'. I see the distinction between 'an application' and 'windows belonging to an application' has already thrown at least one person. Remember, the icon 'is' the application - the windows are not.

Yes - although unfamiliar there is an elegance to RISCOS' way of doing things.

Thank you for your patience and clear instructions swirlythingie - I followed your instructions but am still getting errors. Interestingly I get two different errors before and after I click on the !GCC application.

The first is 'File not found' the secong is:

'An application that loads a file of this type has not been found by the Filer. Open a directory display containing the required application and try again.'

These appear after I type *gcc --version

I re-imaged the SD and used only zipped files.

I'm not sure I have actualy unzipped anything though - could that be causing my problems? I have just been entering the zipped folder and clicking. Is dragging files outside of the zipped folder the same as unzipping?

I'll repeat the process after dragging these files out of the zipped folder.

I expect its a simple error I'm making. Thanks again for your patience - Im enjoying learning from my mistakes. I might try the PackMan route or wait until someone else more capable than me is successful and copy what they do!

The same happens after I drag out the files and even after I've merged the C and C++ compilers.

My understanding now is that just looking at an application runs its !boot file.

As I get two different errors before and after clicking on the !GCC application every time I reboot despite setting the application in the look at schedule, I'm guessing that the !boot file is not running.

Ah - I've just realised I was making some assumptions in my previous post which were invalid. I've checked out the !GCC application for myself now, and it turns out that (a) the !Boot file does not define its commands and you do have to double-click on it, and (b) the binaries are in ELF, not Absolute, format. The latter point is important because RISC OS can't execute ELF binaries natively, which explains the error you're getting.

You should have an application called !SharedLibs. I think this is included in the main GCC distribution, but if not, go and download it. (The zip might be called "SOManager" or similar.) !SharedLibs defines the run action of the ELF filetype, and without it, you'll get the "An application which loads a file of this type..." error.

Once you've located this application, add it to the 'Look at' list in the same way I described earlier. It would probably be a good idea to unzip it first - and yes, the way to do that is simply to drag and drop it from inside the zip file to some other directory. (There's a program called SparkFS which transparently allows you to access zip files in the same way you do directories, but there are restrictions, and the non-commercial version is read-only. And apart from anything else, SparkFS may not be active during the boot process, so autorunning stuff from within zip files is a bad idea.)

That should fix the error. I'm not sure if PackMan will automate this for you or not, but I should hope so.

EDIT: And since it turns out I was wrong about GCC's !Boot file, if you still want to use its commands without having to double-click on it first, you should add it to the 'Run' list instead of the 'Look at' list - accessible from the same place.

Oh, and once you've got !SharedLibs installed, you'll probably get an error along the lines of "Application needs a minimum of 6000K to run" when you type "gcc". Left-click on the raspberry, find the red bar marked 'Next' and drag it out to somewhere north of 6000K. Then close your TaskWindow and open a new one. The new TaskWindow will have 6000K (or more) allocated to it. Alternatively, you can type "WimpSlot 6000K" in an existing TaskWindow to increase its memory allocation.

Last edited by swirlythingy on Sun Nov 04, 2012 3:08 pm, edited 1 time in total.