RPCEmu on AArch64 Linux
Stuart Swales (8827) 1357 posts |
Has anyone tried this recently? On a Pi 4 w/ Raspbian for example? I presume that the recompiler is a long way off. |
djp (9726) 54 posts |
A recompiler RPCEmu build on a new 64bit Raspberry Pi OS installation on an RPi400 failed, “Fatal error : no recompiler available for this architecture”. Interpreter built but ran at about RPi0.2 speed. |
Stuart Swales (8827) 1357 posts |
Ta. Good to know where we are. [ Those RPi0.2, are they still available? ;-) ] |
Stuart Swales (8827) 1357 posts |
Just seen the new WifiSheep YT running RO 3.71 on a RISC-V64 system (Allwinner D1) using RPCEmu 0.9.4. Well, it ‘worked’! Sorta ARM2 speed. |
Mr Rooster (1610) 20 posts |
Isn’t there a dynarec build for the Apple M1? That should build under AArch64 linux without too much tweaking? I did start to have a go at writing one, but didn’t realise it’d already been done. There’s nothing much that’s Apple specific that I’d run into code wise IIRC. You may have to enable execution on the JIT code buffers, but that’s about it. I got it to about double the interpreted version speed, but I had some issues (mainly caused by me not really knowing what I’m doing I suspect). |
Chris Gransden (337) 1207 posts |
Here’s a comparison running ROMark5 (Processor – Looped instructions) on RPCEmu interpreter version on a few arm64 and one x86 machine running Linux. Also included is the Geekbench 5 single core score and recompiler on x86
|
Peter Howkins (211) 236 posts |
I should probably mention we have a prototype AArch64 recompiler, whilst still in progress it does offer a significant performance increase over the interpreter. At some point it’ll be rolled into a future release of RPCEmu. |
Jan Rinze (235) 368 posts |
@Peter: is the AArch64 recompiler open source? I’d definitely would like to beta test that. (on M1) |
Peter Howkins (211) 236 posts |
Unfortunately not yet. Due to the previous behaviour of those in the RISC OS Market 1 we no longer feel able to publish work-in-progress code of certain features. 1 ‘Market’, not ‘Community’ |
Mr Rooster (1610) 20 posts |
As I’ve finally got my act together and registered as a dev (and can therefore sign things, in theory, so other’s can run them) you can try my rubbish version if you like, it basically recompiles 1 instruction (I think), badly, but it does still seem to be a bit faster than the interpreter on the M1. If I’ve managed to wrange Qts packaging tool correctly, there should be a .dmg here: (I make no guarantees it’ll even run, or if it does, then proceed to work to any standard whatsoever… :) ) Edit: I have tried building it on Aarch64 linux (debian to be precise) but it doesn’t work. :( I suspect it may be a GCC vs LLVM vs my generated function calls, but I’ve not investegated further. |
djp (9726) 54 posts |
The dmg does run on my M1 Mac mini. The boot is rather noisy, with a loud intermittent buzz. A very very brief look shows this recompiler to be a bit less than twice as fast as the interpreter. |
Jan Rinze (235) 368 posts |
Same here. the dmg runs and for example the Iron Dignity demo runs a bit smoother. |
Jan Rinze (235) 368 posts |
@MrRooster: the memory management fixes for APPLE seem to be quite out of sync with other ARM64 builds. Also GCC has aarch64 as identifier, not ARM64. |
Mr Rooster (1610) 20 posts |
@Jan yeah, I did make those changes when trying to get it to build on linux (Marking memory as executable, using aarch64 as well as ARM64, etc..) , it was working as expected, i.e. trying to executed JITd code. (My initial attempts just tried to get it to execute the JIT’d code that calls the interpreted version). But was tripping up… somewhere. I did only try for a few minutes though, and it was on a linux build running under a VM on the mac, which wasn’t the most stable of environments to develop in. :) (I don’t have these code changes anymore either, they’re not in the build above). My gut feeling is it’s differences in GCC and LLVMs procedure calls, the Apple code I wrote conformed to APCS64, but I get the impression (from other comments in this forum) Linux might do it’s own thing. I didn’t really try hard to get it working though, as I’d lost interest in it as I realised it was a bit beyond my current skill levels, and the effort I’d need to put in to learn enough is currently being expended trying to figure out multi processing on x86. edit: (Also, the people who know what they’re doing are writing one, so it doesn’t seem worth continuing with my ‘knocked up in a shed’ version. ;) ) edit2: Also, just to be 100% clear, that’s very hacky, mid being played around with code. I wouldn’t normally release it, it’s only there because a licence file told me to do so. ;) |
David Feugey (2125) 2709 posts |
With the Pi5, that we can now consider as a competitive desktop computer, full speed Arculator and RPCEmu would be so great :) |
Jan Rinze (235) 368 posts |
With the development of RPCEmu now being closed source and no updates, I think we won’t see anything in the near future. |
David Lamda (9487) 48 posts |
RPCEmu closed source. I was thinking only the other day that if that were to happen it’d be bad. No further developments either? |
Rick Murray (539) 13839 posts |
Is there a source for this? The code can be downloaded from the site, and it is licensed GPL. Perhaps it’s just “not as easy” to participate as it could be, especially if the maintainer is currently doing other things…? |
Sveinung Wittington Tengelsen (9758) 237 posts |
Say, to survive as a separate computing platform, is this truly the way to go? |
David Feugey (2125) 2709 posts |
An aarch64 version of the recompiler would be so nice. For Raspberry Pi OS, first, but for the new Apple Silicon Mac too.
In order to use RISC OS on the latest platforms, ARM or not, emulation is already the only way. Nota: the work on the open source version of RISC OS 4.00 is also very promising, in order to provide a fully legal solution to users. It’s also interesting, as it could include drivers for new RPCEmu models (Phoebe computer, or a RPCEmu computer). |