Other pages [ Home | Project page | Test RISC OS binaries ]

On this page [ Introduction | Current state | Download | Helping out | Distribution | Useful links | Mailing list ]

SourceForge Logo

Riscose: Introduction

Riscose is a project to write an emulator for the whole of RISC OS at the SWI level, allowing applications originally written for it to run unmodified on other operating systems without needing any RISC OS ROM code. Goals are speed, compatibility and portability in that order. This page is probably only interesting to people who have programmed RISC OS; at least until the project gets somewhere.

The way I'm developing it is to take a `target' RISC OS program; in the first case, Darren Salt's port of grep. There's already an ARM and memory emulation in place (largely thanks to ARM Ltd's ARMulator), and I run the RISC OS program through the ARMulator until it hits an unemulated SWI. I emulate the SWI by patching some C into my SWI handling framework, run the program again, see where it stops... until hopefully the program runs. Then we try a more complicated program, rinse, repeat etc. until Zap and Artworks run, and then we all go for a beer.

What state's it in?

There's the Sourceforge project page where you can grab the latest code out of CVS (or a .tar.gz snapshot), or you can read the diary:

03/02/2002
Ralph and Carl have been edging towards integrating OSLib's SWI definition language into the riscose build tree, so that implementing SWIs is as simple as writing and linking in a function with the correct name. Carl has already added a patch for dynamic SWI registration, which is an important step along the way to having dynamically loadable 'native' RISC OS modules.
13/12/2001
Finally I've got riscose to run well enough so that Norcroft cc and Acorn's linker can put together a RISC OS program from sources, and then run the resulting output! Or at least it can do Hello World okay, I've not tried much else. But it's encouraging after so many months of very slow development to have something tangible. Merry Christmas, and here's to some more frequent updates. Also NB that in the preceeding months, I've let Ralph Corduroy start to check things in himself when I'm up to my neck, and he's very keen to streamline the build process and generally clear up my mess, which I'm very grateful for :)
31/07/2001
Too little, too late, but at least it's something! I've uploaded the fruits of some source reorganising without fixing the bugs I'd promised to. But life is slowly settling, so I'll be making an effort to work on it over the next couple of weeks.
30/05/2001
Okay, okay, so another five months with bugger all done. But in case you didn't know, Chris Rutter died in March, and this is bit of a blow, both personally and for the project. I've got my university finals in about five days, after which I'm moving to York and starting a consultancy firm with a couple of friends. But the plan is for life to settle down a bit, for me to have some more free time to work on this. I did actually spend a few days about a month ago re-organising the source code for easier maintainence & contribution, and I'll check this in once I've had an evening to fix the bugs I've introduced (or discovered). See you back here with an update in about a month, I hope.
25/12/2000
Merry Christmas! And not a bloody line written on Riscose in a while-- humph, well, I need a job to afford all those Christmas pressies :-) I'm graduating in six months' so I guess if nothing happens 'til then, nobody is going to be surprised. Still, I've had plenty of ideas and the odd chat with Chris, and it's not as if RISC OS is a moving target... but I'm still keen on the project and will get back to it once I've cleared a few things from my plate.
08/08/2000
Just got back from a very geeky holiday! Merged in a patch from Chris that fixes sleeve, so it now works as reliably as the ARMulator, and quite a bit quicker too. Just see the top of the Makefile to choose between the two emulations.
28/07/2000
The build system is a little more settled now (one easy to set-up Makefile which should do us for a while) and Phil wrote another patch to run riscose on a Linux box with a real ARM in it. Later on... Bored fixing the C Library so for now am having a go at getting real RISC OS modules working as tasks, providing SWIs etc. since BASIC emulation is probably going to be a long time in coming :-)
27/07/2000
I've merged in Phil Blundell's first stab at a VDU driver for text-mode stuff; it might run Twin now if we're lucky, but I couldn't find a copy of the program to test. Also re-organised the build so that ARM emulations are switchable: even though there's only one at the moment, sleeve nearly works with it and Phil is trying to get it going on a real ARMLinux box, so we'll have three types of ARM pretty soon. Finally I've added the start of an emulation of the RISC OS FILE structure which is currently causing so much grief (see clib_file.c/h).
23/07/2000
I've been idle for a few days while Alice has been visiting, but Chris Rutter has been working on a replacement ARM emulation (called sleeve... groan...) and Nick Burrett has given me permission to distribute a similar project of his which can run GCC; it's available here. I'll probably be stealing some code from it quite soon :-)
19/07/2000
Right, it's probably safe to release now... go get it from CVS on the Sourceforge project page and help me out! There's another page where I've put some of the RISC OS binaries I've been using to test the code so far.
18/07/2000
Got a bit distracted by trying to hack the Playstation with one of those cheat cartridges (not much headway there just yet :) ) but riscose is oh-so-nearly running Norcroft `cc'-- it gets as far as reading in the source of helloworld.c, and outputting the start of an object file before giving me back `compilation abandoned', plus a load of quotation marks, giving me the impression that printf is broken :-) On the bright side, the heap manager seems to work and I've got a load more of SharedCLibrary taped (though I'll have to integrate what I've done here with my embryonic OS_File). Anyhow 24hrs before Alice turns up and distracts me from all this until the weekend, so I'll probably release it tomorrow night sometime.
15/07/2000
Wow, it actually runs a simple test program I compiled on the RISC PC, but now I can't avoid it any longer... I've got to write a heap manager! (cue groans, whimpers, sobs). This task was brought on by my assumption that programs would not deference FILE* pointers, and anything linked against UnixLib (that's grep) needs to in order to implement fstat() and friends. But I feel the grand CVS import is going to happen soon.
14/07/2000
Progressing a lot faster now-- thanks to Robin Watts I've got the stack set up properly (well enough to fool grep anyway) but thanks also to Robin for teasing me with What Happens Next in Silent Hill, and making me spend another 2 hours playing it today instead of hacking :-) Well it's now calling fopen(), and so I presume it's finally about to do some real work! Right, off to watch Friends + South Park + Frasier, with a cup of tea, then back to it...
13/07/2000
Feeling more confident about the framework now: I'm still trying to understand the APCS and the way a program uses the SharedCLibrary from its inception, but I'm starting to get calls to `real' library functions like strrchr rather than all this arsing around with root stack chunks. I presume it's starting to parse the command line. Hurrah!

Downloading riscose

Before you download, be aware that it probably won't do anything remotely useful at the moment, and you'll almost certainly want to be a developer interested in hacking at it.

Helping out

If you want to help out, you'll probably need access to a RISC OS machine of some sort (unless you're feeling very cocky), a copy of the RISC OS Programmer's Reference Manual or the StrongHelp editied edition of the same (unless you've got a very good memory) and a little time to spare. Join the mailing list, and if you want to submit a patch, check the project page for the patch manager. Obviously before starting on any major work, ask on the mailing list to see whether you'll be duplicating anyone else's effort.

Terms of distribution

As hinted at on the Sourceforge project page, Riscose can be distributed either in source or binary form under the terms of the GNU Public License.

Useful links

Mailing list

If you want to chat about it, or help development, or at least know when there'll be some code released, mail riscose-subscribe@lists.soup-kitchen.net to subscribe to the mailing list.

Matthew Bloch, mattbee@soup-kitchen.net