Friday | August 26, 2005

RISC OS on x86 - not again

The idea of porting RISC OS to x86 comes up regularly, and although it sounds like a good idea, it's not.  This article discusses the problems, and why in reality, it's simply not a good use of resources.

Introduction


It's a bad idea.  No, really. This suggestion comes up every few months, and the protagonists always seem to ignore the facts, or what's been said the last 10 times this suggestion came up. So I'd like to debunk this idea, again, and hope we can wash our hands of this silly mess.

The Myth

Porting RISC OS to x86 would enable use of much faster and cheaper hardware, and be relatively easy to do and open up the market for RISC OS.

The Problem

None of the issues I'm about to mention are technically insurmountable; they represent a great deal of work - sometimes a very large amount.  The logical mistake that people who propose the idea is that they think if they have a solution to one of these issues then that's it, and the problem is solved.

Effort

Moving RISC OS itself to x86 would be an enourmous amount of work.  Much of RISC OS is written in ARM assembler that would need to be converted to x86 assembler or C. In the latter case, there could well be a relative performance loss. Much of the rest of RISC OS (in C and BASIC) makes a considerable number of assumptions about running on an ARM architecture, especially the SWI interface. Such problems can be overcome if you're Apple (now having essentially completed their second architecture switch) with millions of dollars and thousands of programmers, but this is magnitudes more resources than RISC OS development has.

Even after you've done it, there's a maintenance issue.  It's not like Linux where almost all of it is in C, and therefore easily looked after for multiple architectures.  It's likely that legacy ARM hardware versions of RISC OS would need to be maintained, and that means all that existing code in ARM assembler needs to be looked after alongside the x86 or C equivalent. Which means lots of extra time and effort.

The applications

After you've done all that, most of the applications would really benefit since they would have to run under emulation anyway (being binaries with ARM code, etc).  Certainly BASIC would benefit, but most applications which would really benefit from faster hardware aren't written in it. The applications that would really benefit under RISC OS on x86 are graphics intensive ones - ArtWorks, Photodesk, OvationPro, etc. The first two contain significant amounts of assembler, so faces the same problem as RISC OS itself if you want a native version.  The last already has a Windows version, so there's arguably no real benefit there.

Yes, many C programs could "just" be recompiled.  But the situation is unlike the 32-bit conversion - new binaries won't run on legacy hardware.  Although in principle you could have both ARM and x86 code in a binary - this would of course double the size of binaries.  Irrespective of how it's done, this means lots more work for a limited number of RISC OS developers.

Drivers

Hardware for x86 is notorious for changing every few months.  For example, the Iyonix video card has gone through at least 4 revisions and its driver has had to be modified each time.  For most of the rest of the hardware in an Iyonix, it's not such an issue since there is a relatively static design, and RISC OS will need few or no changes if another hardware run is done.  Plus the supporting the huge range of PC-style hardware would be impossible, so it would be tied to a specific setup, meaning a potential strike against cheaper hardware.

Cost

The cost involved in developing such a thing should now be obvious.  There is no way such a solution could be cheaper than existing RISC OS hardware solutions - the time and effort would mean it would be very expensive indeed.  And the motiviation for doing this at all by a company - ultimately making money from this investment - has no clear path.  There's no way to make money out of x86 RISC OS in the same way that existing RISC OS can be applied to low power consumption solutions outside the enthusiast market.

Time

This would take several years to do - by then things would have moved on considerably: faster ARM processors for example and emulation techniques, as well as stagnation of other RISC OS developments by sapping the efforts of its few developers.  Certainly it would divert effort from things RISC OS really needs - better application support - which is the real problem with RISC OS, and other OS level things - shared libraries, PMT, etc.  All things which could be done with much less effort, and with relative transparency to most programs and developers.

"But it could run on an interface layer and talk to Linux drivers, etc"

Great. But the problem here is that no-one who's made this suggestion has been able to come up with an idea about how it would work, much less a concrete example - mostly it's been unfortunate hand-waving. If you're going to persue this argument, then please try and think hard about the issue before making your proposal.

Other Solutions

Apart from all the problems I've named above (and I don't think I've been comprehensive), there isn't a great deal that you would gain over existing solutions - solutions that are already available and work, and are much less effort to extend.  In particular, VirtualRiscPC and RISC OS emulation solutions.

VirtualRiscPC

Despite the long list of grievances I have against VRPC, it's already a working solution, able to run on arbitrary x86 hardware by leaving the drivers and hardware support to Windows.  For those who find the idea of running on top of Windows abhorrent, a MacOS version is in the pipeline, and although a commerical Linux version may not be immediately on the cards, it's no real technical challenge.

It's certainly plausible that modifications could be made for example to the RISC OS Wimp to fully integrate RISC OS applications into the Windows (or whatever) desktop.  There are many areas in RISC OS this could be done.  The effort involved is well within the capacity of a single person to do.

QEMU

I'm referring to the work mainly done by Nick Burrett with additons by myself.  This allows basic command line RISC OS applications to run directly under Linux via emulation. It's unlikely that you could ever run a broad range of RISC OS programs with this, however specific applications could be targetted and persuaded to run as "first class citizens" alongside native Linux applicastions.  There are obvious solutions for implementing WIMP SWIs by mapping for example to GTK.  Most of the work is implementing SWIs correctly. In some cases this could be a lot of work, but certainly in the grasp of a handful of developers. 

Unlike a native x86 RISC OS, it can be done incrementally and be useful all along, whereas a full solution would not be useful until the vast majority of work was done.  Comments here also apply to a similar program, robe.

Conclusion

There's no clear benefit in having a native RISC OS on x86 over other options, including what we already have on ARM platforms.  It would be very expensive, and take a long time and the tangible benefits would be marginal.

I hope that's the end of this.  If you're going to persist with the view that it's a good idea, I ask you to think very carefully about what you're proposing.  This is one instance where half-baked ideas just won't do.
Posted by riscos at 10:56:57 | Permanent Link | Comments (8) |
Comments
1 - Dunno why i read this cause ive never suggested it can understand your point of view fully.. but u got my thinking (just to annoy u).. why not a version for my phone its got a 416Mhz Arm processor.. 64 megs of ram etc..? :) (Comment this)

Written by: Glenn Sweeney at 2005/08/27 - 00:44:06
2 - For precisely the same reason there isn't a version for hundreds of other ARM devices - it isn't financially sensible. (Comment this)

Written by: Peter Naulls at 2005/08/27 - 08:01:52
3 - As I say on Iconbar, at least using something distinctive to PCs provides a foundation for independent growth and innovation of RISC OS machines. Ideally this should mean the best of both worlds - compatibility and originality of ideas, conventions and programs themselves. (Comment this)

Written by: AW at 2005/08/27 - 20:29:45
4 - On x86 there is a "RiscOS"like-OS: PC/GEOS (www.breadbox.com). (Comment this)

Written by: AlexZOP at 2005/08/28 - 11:55:52
5 - The below started as a comment, but turned into more of a rant - please feel free to flame me....

Nathan

The RiscOS community has missed a real opportunity. Targetting the plethora of different ARM devices is exactly what should have been done after Acorn disbanded. There was a real and massive opportunity to be taken advantage of. Had this been done, and real world applications provided, RiscOS could have provided the defacto PDA GUI - after all RiscOS itself had a massive head start ahead of Windows CE. As it stands all we ever hear are excuses why its not worth porting to some device or other. Does anyone seriously believe you can ever achieve greatness if you knock down every idea or opportunity with some lame excuse that basically boils down to 'its too hard' or 'its too much work'? Don't forget there have been 6 years worth of elapsed time available....

As it stands - RiscOS (at least from the end user's perspective) has lived in maintenance mode for the last 6 years, and the RiscOS community would have been much better served had the OS been open sourced. Castle's use of Pace's developments in RiscOS 5 has showed real initiative, but re-developing the 32 bit version by RiscOS (the company) was ridiculous - what a waste of time, work that could have been much better employed in enhancing stability, or providing some of the basic OS features defined by posix (real multitasking with a pthread implementation for example).


All the valueable RiscOS applications that I'm aware of now available on Windows (though the last two haven't been well marketed)

Sibelius
Artworks (Xara)
OvationPro
BBC BASIC

The only things left of value that I can think of is the GUI, and the native ARM support.

What next - continue to emulate a 10 year old RiscPC because it brings in a few grand a year, or target a real global market of ARM devices. Perhaps Castle or STD are planning something really interesting behind the scenes that will make a real difference to us, but what do you think? One thing that would make a real difference would be for Castle to open source RiscOS 5 - that is a real opportunity to make a difference that could happen now if the will existed.What can they lose - currently they have a closed source OS that hasn't got modern OS features, and therefore has a limited market. Open source it, make it free for developers to use, and let us add the features we want. Castle can sell it to whomever they like, but they get a great OS to sell instead of an outdated one, and we get the RiscOS we always wanted on the devices we want.

I doubt this will be popular, but don't forget its just my opinion .... (Comment this)

Written by: Nathan at 2005/09/06 - 10:02:37
6 - "Does anyone seriously believe you can ever achieve greatness if you knock down every idea or opportunity with some lame excuse that basically boils down to 'its too hard' or 'its too much work'?"

Diversifying is fine as long as you have a sound business plan. There will always be a risk that your venture will fail and your company will go down the tubes. It would seem reasonable to assume that RISC OS Ltd have never had a plan which warranted that risk, or perhaps just lacked the financial resources. The only other people in a position to take RISC OS into new areas were the computer manufacturers and we can see that Castle and Advantage6 are doing just that.

On the question of open sourcing: Is it at all feasible for Castle to sell an open sourced OS? How do you charge for such a thing? Such a move would also mark the end of RISC OS Ltd. And Castle would also be at risk of losing hardware sales if another company modified RISC OS for their own hardware. I suspect the current arrangement with Adv6 sees Castle net at least some cash from each sale. (Comment this)

Written by: Dave at 2005/09/08 - 09:40:04
7 - I certainly think its feasible to open source it - open source doesn't necessarily have to mean free to use. All the RiscOS companies do a good job within their own world, but with the loss of Acorn there is no longer a big player pushing us forward, just a lot of little players pushing a little here, a little there. If the OS were open sourced, we could push it forward as a community in the direction we want. Castle can still charge for user licenses, but make the OS free for developers. One thing I find really silly is that Castle charge for the development tools - surely anyone can see that the more developers have access to the tools and can produce good software, the better for Castle.... (Comment this)

Written by: Nathan at 2005/09/08 - 10:48:53
8 - The RISC community is doing itself a disservice by ignoring the portable ARM market. I am writing this on a Sharp Zaurus C860 running ROX on top of pdaXrom (ARMLinux). While this is certainly a functional setup, I would switch to RISC if it were available and supported, and in ARM Assembly without the added abstraction of Linux. Unfortunately, the companies involved with RISC OS are trying to sell to what is essentially a niche and legacy hardware market. If one of the problems associated with RISC on x86 is the potential duplication of apps, it must be noted that an ARM desktop computer is duplicating nearly all of the same functions as x86 or PPC desktops without availability and economies of scale working in its favour. The handheld market is where ARM architecture has its biggest installed base, and ignoring it seems to be self-defeating. The best situation up for all would seem to be to open source RISC OS. Open-sourcing would most likely lead to support for more ARM machines, and this in turn would likely lead to increased interest in the desktop units. RISC on x86 would indeed be a waste of time, but extending support to handheld ARM devices seems like it is necessary for RISC's very survival to me. (Comment this)

Written by: Matt at 2005/10/07 - 11:21:33