Kevin's Research Blog

RISC-OS: My Final Thoughts

My last post did not receive much views when compared to my previous one, regardless of how much research I put into understanding the ins and outs of the boot process, so I think it is time to move onto a different subject next week.

I may make additional posts about RISC-OS in the future as I continue tinkering and even trying to develop actual applications for the platform, so if you did enjoy some of those articles, there might be some more in the future. This final formal post will be my final thoughts about the operating system, and what I feel about it overall.

Perhaps the BEST Hobbyist Operating System

The sheer amount of programmability in RISC-OS makes it a powerhouse of an operating system for people interesting in hobby programming. The entire boot process can be really customized to do almost anything you'd please, and the boot process I explained the other day is merely just the one officially provided by RISC-OS themselves, but it can be completely swapped out, or even removed if you want a really vanilla experience for a specific program or purpose. The APIs are well documented, and most distros of RISC-OS provide a lot of developer documentation to easily get you started. The main downside for me originally was the lack of the Pascal programming language, as I didn't realize just how powerful BBC BASIC actually was until recently. Don't underestimate BBC BASIC, and in fact, next week, I will be diving more into the BBC Micro as I planning on creating a Pascal unit using the P65Pas Pascal Compiler which will allow someone to compile Pascal code into native BBC Micro 6502 machine code, so do check out that post early next week when I talk about that project some more. So, here are some points that you should consider if you've ever denounced BBC BASIC because of a past bad experience with another BASIC dialect:

So before you get all pissy about not being able to use your favourite programming language on RISC-OS, give BBC BASIC a real shot, you'll be rather surprised on how capable it actually is.

RISC-OS does need more Software

At the moment, if you did decide to use RISC-OS as your daily driver, you'll find that a lot of programs you may have used elsewhere don't seem to exist. At first this can seem like a problem, but as I've learned before when I first moved to Linux back in the days of yore, that this is a sacrifice that sometimes needs to be done to see the other benefits of the operating system. Nowadays, Linux has become extremely polished, but it did take time for this to happen. Now, if you moved from Windows or macOS to Linux, you'd be-able to get around just fine with the software that is available.

The other problem with RISC-OS is the current state of browsers, although I did see an article recently that mentioned Firefox has been ported to RISC-OS, so there has definitely been progress in this front. Although not having a fully capable web browser can also be a good thing, as the Internet can be rather distracting, and if you don't need to care about constantly opening your browser, and instead focused more on what your operating system has to offer, you might even be less depressed.

RISC-OS has a lot of it's own software to offer and explore, and it has been a real treat to try out software which isn't otherwise available on other mainstream platforms. Even the included application suite, which is partly in ROM still on modern RISC-OS is very powerful. The other night I stayed up too late as I just figured out how seamless the copy and paste functionality in RISC-OS actually is. Which brings me to my next section here.

RISC-OS Native Applications are Unique

When I first began to use RISC-OS, I tried to treat it like a regular operating system that I've used, trying to find replacements for existing workflows that I've already established. This was a very wrong approach, and as a result, when I initially tried it, I missed out on a lot of it's superior functionality that not many people would know at first.

Firstly, Copying and Pasting is unlike any other operating system you've used, although some newer apps have been incorporating a modern system-wide clipboard system, so some apps now do support keys like Ctrl-C and Ctrl-V as most users have come accustomed to. However, to use RISC-OS to it's fullest potential is to understand how it did this before people complained that they couldn't use their favourite copy and paste methods.

In RISC-OS, if you haven't tried it yet, the save box isn't your typical one, which might confuse some new users at first, as it did me. However, the save box is presented in this manner for a very specific purpose. Sure, you could just drag that new text document icon into a directory view or onto a drive in your Icon Bar, but you can do so much more with it. A lot of native RISC-OS applications support the acceptance of a variety of file types directly dropped into their windows! Let's start with a simple example and then get more and more complex from there. So, say you want to copy some text from one text document to another. If you use StrongEd, a very powerful 3rd party editor, it's as easy as these steps here:

  1. Highlight the text in your document as you would on any operating system with your left mouse button.
  2. Drag the highlighted text you just highlighted into your second document.

And that's it! It's really easy once you get the hang of it. It even supports copying and pasting like this inside the same document of course too! If you are using a different editor, like the built-in one, it's a bit different:

  1. Highlight the text in your document as you would on any operating system with your left mouse button.
  2. Middle click anywhere in the document and open the Selection sub-menu.
  3. Select Save, which will open a typical save box.
  4. Drag the text icon in the save box anywhere you want the selection to go, including a directory window, or another document.

It's a bit more complicated with older RISC-OS programs, but I hope that a lot of newer RISC-OS programs take the StrongEd approach, as it is just as easy, or even easier than my X Selection method I currently use on Linux.

Okay, so now for some more interesting copying and pasting that is available in RISC-OS. The Draw program is much more powerful than I originally thought when I dismissed it at first. Don't underestimate the sheer power of this application which comes with RISC-OS in ROM and has been available since the first versions of RISC-OS 2.

In a way, you could use Draw as a virtual scrapbooking application, as it can accept multiple data sources by simple just dragging it into the document. Here are some examples of what you can do with:

The most impressive part about Draw is that these files then become a literal part of the Draw document. This can allow you to easily save these components back into files if you so please. So, if you say wanted to edit that text area in a text editor again, simple select it in Draw, middle click to open the menu, and select the option to save the text area which will of course open a save box with text document icon which you can then drag anywhere. What's more, is that you won't even lost any of the formatting you made in Draw, why? Because when you take that text area and place it back into a text document, it will also contain a bunch of metadata for it's style. You can of course also modify this style data before bringing it back into Draw, or even create all the styling using these special codes before even placing it into Draw in the first place. What is also neat about Draw, is that if you have the text area selected before dropping a new set of text into Draw, it will paste exactly there, so you don't even need to worry about deleting it from Draw if you plan on editing it, as it will keep all the bounding boxes in tact! This makes Draw extremely powerful as a desktop publisher. This works for all the other types you may wish to update. Did your client send you a new copy of that JPEG with some corrections? Just select the existing JPEG element you already have, then drop in the new one to seamlessly replace the one there, it will retain all the same attribute, such as bounding boxes, and scaling. It's extremely powerful stuff in the right hands. I wish I still had my YouTube channel so that I could have created a full demo of this in action, but I'm sure someone already has made a video, so do search YouTube for this and you'll be rather amazed!

Another interesting thing that I found out the other day about the copy and paste system in RISC-OS, is that the PDF reader I have on it can do some pretty nifty things. It's always wise to explore the middle-click menu button in each and every RISC-OS application, I never really bothered before with the PDF Reader, but here's what I found out. You can easily export a single page in a few different formats. Say you are doing some research on a topic and are studying a PDF document and would like to take a page of text from it, and say plop it into a Draw document. If you open the menu, there is an option to save the page as text, and as you've guessed, it will show you a typical RISC-OS save box, allowing you to take this new text document of that page and paste it anywhere. If you only need a small piece, then you can first place it into a temporary Edit document, look for the snippet, highlight that snippet, then take that selection and bring it over to your Draw document! Do you want an image scan of a single page? That is possible as well, as some PDFs might just have been scanned, making text extraction impossible. There are several ways to grab the information you need, here are some of them:

Another program which also supports a similar export feature is the NetSurf web browser. Allowing you to easily turn a full page into a Sprite file, or as mentioned above, just use the Snapshot ability of Paint to take the exact portion you need. Of course you can also just highlight text within your browser, and export it as text into Draw which is much more efficient.

You can also effortlessly take any element or elements from an existing Draw document and drag them over to another Draw document! The entire process is very seamless. It's also possible to programmatically create Draw documents using BBC BASIC and other languages. Say if you are using a BBC BASIC program as a way to read some statistics and want to generate a nifty customized chart using BBC BASIC graphic commands, it is technically possible to have it generate a new Draw document using a special API, or DrawGen. Of course nothing is stopping you from say running a classic full screen BBC BASIC in one of it's several graphics mode then using the *SaveScreen star-command to save the entire screen into a RISC-OS compatible Sprite file! The possibilities are really endless here.

RISC-OS Emulation

There exists several popular emulators for RISC-OS, both ones which can emulate the older Archimedes platform, which is needed for some 26-bit Applications and Games, and then there's emulation of the more modern RISC-OS machines. Depending on what you would like to do with RISC-OS, you need to choose the right emulator if you cannot run it natively. Even on the Raspberry Pi version of RISC-OS, there is an emulator included for using the older 26-bit Software, which on my Pi is called AcornMode, which is actually the version of ArcEm compiled for use on RISC-OS, which runs full-screen, giving you a very authenticate experience. ArcEm on Linux unfortunately cannot go full-screen, and I'm not sure about the other supported platforms. However, some older and much acclaimed games can only run on a 26-bit compatible RISC-OS machine, so do keep that in mind.

To emulate modern RISC-OS on your non-RISC-OS compatible PC, you'll need to use the popular RPCEmu, which is supported on multiple platforms, and is easy to compile on Linux. It does have limited networking capabilities, and I tried to make a post onto their forums to request the addition of VDE Networking which is currently supported in some way shape or form with other popular emulation software such as 86Box and QEMU. With VDE Networking, you can easily connect up various virtual systems together, and I've got it to also connect successfully into a Docker bridge, allowing the sharing of various docker containers with some of my virtual systems. I will post the full post I tried to make to the RISC-OS Open Forums below as I got an Internal Server Error when I tried posting...

Both ArcEm and RPCEmu support the modern HostFS filing system in RISC-OS, but it needs at least version 3 of RISC-OS to work. This allows you to both easily copy software for RISC-OS into the machine, and to also use it as a boot drive via *Configure FileSystem HostFS. Both of these emulators also support both ADFS formatted floppies and hard discs of course too for that more authenticate experience.

A bit unrelated, but working with BBC Micro formatted DFS is still a bit tricky. I've found some RISC-OS software which says it can read these discs, but it cannot read all of the formats, which is a bit of a shame. I wish someone would create a native DFS filing system for RISC-OS to make opening up these disc images easier. I'll be going into the BBC Micro, and some of it's emulation quirks next week.

Personally, I prefer to run RISC-OS natively on my Pi, rather than through an emulator on my Intel PC, as it is a far better experience. The use of an emulator for RISC-OS is very useful however for some situations, for example, if you want to try out some stuff in RISC-OS, but don't want to accidentally break your native installation. It really helps with the exploration aspect, as doing things in an emulator is much more safer than on your real hardware. Learning always means making mistakes, and so emulation really helps here. On my PC, I tend to use the Btrfs file system, and have a base subvolume with a pristine RISC-OS installation, then I made a writable snapshot of this for a main system, and then if I want to fool around with something new I've learned, I create a throw away snapshot, boot that up, experiment and learn, then toss it. It's a really good workflow, but I don't think this would be as easy to do on the mainstream desktop OSes, which is another reason Linux has been my daily system for about 2 decades now, is this sort of versatility that is just not available on either Windows or macOS. But this post isn't about Linux, but I may write a post soon about all these features I use on a daily basis that can only be done on Linux. If you are a hobbyist, just ditch Windows and macOS already...

What Next?

In terms of RISC-OS, after reading more of the developer documentation, I am now planning on actually trying to build proper applications on RISC-OS and seeing how far I can get. Right now on RISC-OS, there is a need for more software, and if I can learn enough about how RISC-OS works, I could contribute back to this really amazing operating system.

The co-operative multitasking while some might see as an outdated feature, for a hobbyist, I think it's perfect! As long as your software is written properly to call Wimp_Poll, it will multitask perfectly fine with the rest of the system. If you are a developer more interested in creating games for the platform, then this co-operative multitasking might actually be the best feature! You see, with previous co-operative multitasking systems like older versions of Windows, this was a huge burden, as even if you made a full screen app or game, it was required to participate in the multitasking, in RISC-OS, participation is actually optional! This can be seen by hitting the F12 key to get a full-screen star-commands session, where you can then run another full-screen application, or even run BBC BASIC full-screen as it was done on the BBC Micro. RISC-OS doesn't care if your full-screen application doesn't constantly call Wimp_Poll, and whenever you actually launch any full-screen BBC BASIC program, it usually won't ever call this, and just begin working like a full-screen BBC Micro application. In this situation, your application or game has the CPUs full attention, and no background tasks will interfere with your program or game causing it to say lag or something. This can cause issues with some server-based programs, but if you don't launch a server program on your RISC-OS machine, then it's fine. Another really neat part about this co-operative multitasking system is full task suspension and resume support, even for full-screen applications and games, and it's almost instant! Ever need to swap out of that full-screen Windows game to get back to your desktop to jot down a note or quickly look something up? The process of switching can be incredibly laggy, and even then, some games are known to misbehave when you try to go back to them. This doesn't happen on RISC-OS, and the process is incredibly seamless and response. In the game Elite for example, it uses the common function key of F12 to jump back to the desktop. A lot of full-screen applications will trap this key to resume the desktop and multitasking. The icon for your full-screen program or game will remain in the Icon Bar, allowing you to effortless single-click it to resume your full-screen session in a matter of sections with zero lag. When an application is just in the Icon Bar, it goes into multitasking mode, and will begin doing Wimp_Poll as it waits for the user to click onto it's icon, or even close it. The game or application could also technically do some light background processing if it wants too, but it doesn't need to, all it needs to do is call this Wimp_Poll in it's loop waiting for the user action. One neat idea I can see for this is for simulation games, think a life simulation, where your characters can still live their lives in the background, but only the AI parts of the program are being run, not the rendering part, which saves a lot of CPU resources. One game idea I am having with this is a full-screen Tamagotchi simulator, where you can view your Tama by clicking onto your Icon Bar, but if you are on the desktop, it will still continue living as it's AI code will still run via multitasking. Then it would use the standard RISC-OS notification systems to alert the user when their Tama needs their attention, as any Tamagotchi did back in the day. This is probably the most efficient operating system for such background life simulation games, and I really want to try developing something for it along these lines.

And that's all I got for this post! And again, Happy RISCing!

RISC-OS Open Forum Post:

Love how well the RPCEmu runs on Linux, but my only complaint is the lack of available networking options, with the only good one requiring the use of the stupid sudo command, of which I refuse to use on Linux. Not sure if the dev of RPCEmu has used 86Box or QEMU, but there is a really powerful networking mode available to them, and on Linux in general that I'd love to see available in RPCEmu, VDE Networking.

https://docs.oracle.com/en/virtualization/virtualbox/6.0/user/network_vde.html

Which also seems to be available in VirtualBox, as I just did a search to find a good page to explain it for everyone. This option does not require the program to have any elevated privileges at any point, as the VDE switch is usually created upon start-up, and has permissions configured accordingly. It is a very powerful and flexible networking option that can allow RPCEmu to connect into a multiple of different network types, such as connecting directly to either a TAP/TUN device with one user-mode command, or connecting to a native bridged network. I have been able to use VDE Networking to connect various emulators directly into Docker created networks, and libvirt created bridges. Another interesting advantage of VDE Networking is the fact that it can also be piped over a network really easily. So, for example, if you wanted to do some native RISC-OS networking with someone else in the world who is miles away, you could easily use say Access+ and other RISC-OS native applications without it having to go over the public Internet. This can be done either natively using a VDE command, or by piping a VDE switch over an SSH connection. It can allow for much more possibilities with RPCEmu and emulated RISC-OS systems, allowing people to try out different options.

Personally, I use this sort of networking to easily create small local private networks to test out networking technology I otherwise couldn't easily. Using a VDE network, would allow me to spin up two instances of RPCEmu on the same private network, and actually be-able to try out things like Access+, which at the moment is a trifle difficult to do with the current networking options available in RPCEmu. I would also be neat to try out the more legacy networking RISC-OS has to offer, such as AUN and of course Econet, of which I think AUN and Econet are one in the same, right? This is why I'd love to experiment more with these networking options in RISC-OS to better understand them. It would also be amazing if there was a BBC Micro emulator capable of using Econet, but that is a bit too much of an ask. I did however find an amazing Econet PDF document from back in the day that explains it all, and it was rather spectacular.

#hobbyist #riscos #thoughts