26 bit applications in 32 bit IOMD OS
David Feugey (2125) 2709 posts |
I was reading this thread: https://www.riscosopen.org/forum/forums/2/topics/2518 Then I did have a small idea. Would it be very difficult to adapt the IOMD RISC OS 5 to accept 26 bit applications & modules? It would very useful to make an old computer more modern while keeping full compatibility with all the legacy applications. Then the 26bit kernel would be only softloaded on demand :) |
Rick Murray (539) 13840 posts |
Probably. :-) The IOMD build of RISC OS 5 runs in 32 bit mode. As far as the program can see, it’s just like running on a Pi, only slower. To introduce a 26 bit mode would require juggling an awful lot of system state of who, what, where, and why. Not to mention such tricky things as SWI calls… RISC OS does not have a parallel API and neither does old/new software. So if ‘X’ calls a SWI, is that in a 26 bit world or a 32 bit world? I’m sure it can be done by wrapping up all of the processor vectors to figure out which setup is desired (likewise such innocuous things as callbacks – do we return to that code in SVC or SVC32 mode?)…thing is, though, I rather suspect such a solution would cripple performance (remember, you’d want this to work well on the slower machine!) to the state that you are probably better setting up some Ethernet and using an old machine for old software and a new machine for new stuff and just pushing data around as necessary. |
David Feugey (2125) 2709 posts |
Summary: the best is to have a dual boot (ROS 4 and softload of ROS 5). Needs a Boot compatible with the two, and perhaps a bit of refresh of ROS 4. Good to know. |
Richard Walker (2090) 431 posts |
As I understand it, the current beta ‘HardDisc4’ image on this site supports most versions of RISC OS (3.1 to 3.7, ROLs 4.x, and ROOLs 5.x). So you’re half way there with that. |
David Feugey (2125) 2709 posts |
Nope, under ROS 3.1, it simply hangs all the computer (or emulator). |
Rick Murray (539) 13840 posts |
That’s about what I’d expect. Recall, older 26 bit applications do not run natively1 in a 32 bit world. The difference between old and new is fairly small on paper, but enormous in reality. It’s like trying to drive through France using a roadmap of Germany. :-) 1 Somebody brought this up in another thread – the general description of “natively” means it runs unmodified. If you need special software to load the program, intercept entry points, munge pointers and/or addresses, etc then that is not “native”. If it can run on the basic OS, then it is “native”. |
Jon Abbott (1421) 2651 posts |
Its incredibly difficult unfortunately. Having been working on something since the start of Dec for ADFFS I’ve only managed to get around twenty 26bit games to run on RO5 with around 50K of handcrafted assembler. There are so many differences between RO3.71 / 4.x and RO5, that simply allowing 26bit code to load and run in User26 wont get you very far. The main issue is the entry/exit points which for a 26bit app need to remain below the 32mb boundary. A lot of SWI’s need modifying, all vectors, Clib and ensuring modules load low are just a few of the issues. Pretty much a non starter at OS level I’m afraid. |
David Feugey (2125) 2709 posts |
Ok I see. Anyway, to be able to use ROS 5 harddisc, applications and modules under a 26 bit kernel (RISC PC or Archimedes) would be great. And probably enough. On RISC PC, that would mean that a perfect dual boot is possible (two kernels, one partition). |
Richard Walker (2090) 431 posts |
David: I didn’t mean to suggest that the RO 5 apps and modules would function on a 3.1 system. I was only suggesting that the disk image and boot structure would be OK from 3.1 upwards. At least that’s my understanding – I only briefly tried it on an emulator. |
Jeffrey Lee (213) 6048 posts |
Correct, if you take the RISC OS 5 hard disc image and apply the pre-OS 5 !System update (aka PlingSystem) over the top then you should get a boot sequence which will work all the way back to RISC OS 3.1. However:
|
David Feugey (2125) 2709 posts |
No it does not work… |