Behind the scenes of a pocket RiscPCPublished: 6th Jun 2006, 01:39:21 | Permalink | Printable
How a mobile port of RPCEmu came aboutDeveloping a port of open source RiscPC emulator RPCEmu to a PDA was a feat that excited those of us longing for a truly mobile RISC OS.
Here, Jan Rinze Peterzon (right) talks us through how the port came about, what it's like to use RISC OS with a touchscreen and stylus, and how well the emulated platform performs on a Loox 720 device.
How long did it take you to produce the port?
The port itself was done in a matter of days and ran at about one million instructions per second. [An A7000+ in comparison manages 43 MIPS] The problems started when I wanted the proper screen resolutions and mouse support.
The touchscreen is not supported by RISC OS so I had to emulate the mouse for it. The biggest obstacle here is that mouse devices give relative movement in the x- and y-coordinates. The touchscreen gives absolute coordinates. To convert absolute to relative coordinates, the emulator now computes the distance from the touchpoint to the real mouse pointer. Single and double click action now works when tapping the screen. Menu and Adjust are mapped to hardware buttons.
For performance reasons I switched from MS Embedded Visual C to GCC 4.1.1 for Windows CE (cegcc).
What sort of performance does it give?
The current speed of the PocketPC port is about 2-3 MIPS and the main focus now lies at making the emulator faster. RPCemu's author Tom Walker has written the emulator with a Desktop PC as his target and most optimisations work pretty well on an AMD desktop processor.
The XScale however only has a 32KB data and a 32KB instruction cache. This is much smaller than the caches of an AMD processor. Using lookup-tables and other optimisation sometimes makes the emulator run slower on a PocketPC. There are a couple of optimisations that I am discussing with Tom which might improve the speed of the PocketPC port.
One is to do a sort-of simple dynamic recompilation where all ARM instructions will become calls to emulation functions. The good part of this is that some instructions can be run directly instead of a call. The bad part is that self-modifying code can become hard to emulate. The second route could be to exctract the ARM emulation from A310emu by Jan de Boer but I would first have to discuss this with Jan. His emulator is quite fast on the Iyonix's IOP321 XScale processor.
Why did you decide to port RPCEmu to that PDA?
The Loox 720 is a pretty well designed Pocket PC, with a 520Mhz XScale PXA 270, 128 MB RAM, USB 1.1 slave, USB 1.1 host, audio in/out, built-in camera and so on. Actually, if you look at it, the specifications are somewhat in between an A9 and an Iyonix. This led me to think that RISC OS would be a perfect replacement for Windows CE. The RPCEmu source code by Tom enabled me to experiment with the combination of RISC OS and Pocket PC.
A long time ago I had been busy with riscose and that ran pretty fast in native mode under Linux - 56000 dhrystones or something like that when running an a 275 MHz StrongARM Netwinder. The Windows CE operating system on the other hand is very restrictive and has a simple memory model. Riscose would not run under Windows CE. A port of Linux for the Loox 720 is slowly being developed but is not sufficiently far to use it as a WindowsCE replacement.
What will we see in the future for mobile RPCEmu?
The best way to run RISC OS on Pocket PC hardware would be to run it natively. That would mean that all the code runs directly on the XScale processor. Currently I would be happy if only parts could be run natively. I am looking into the inner workings of Windows CE to see if that would be possible.
It is a lot of fun using RISC OS with a stylus on a small touchscreen and it is really nice to figure out how both machines work - the RiscPC and the Pocket PC. The port is only tested on a Fujitsu Siemens Loox 720 and is intended to run on VGA Pocket PC devices. QVGA is not supported, yet..
Aside from Pocket PC hacking, Jan Rinze also took part in a hardware challenge, where he and two friends built up a robot using a Netwinder and a ethernut device.
Previous: Don't rely on Drobe, says R-Comp
Next: Explan Solo arrives with a catch
DiscussionViewing threaded comments | View comments unthreaded, listed by date | Skip to the end
Please login before posting a comment. Use the form on the right to do so or create a free account.
Search the archives
Today's featured article
South East show report
VA Linux, graphics acceleration, CTL and ROL and more
53 comments, latest by AMS on 01/11/04 1:01PM. Published: 23 Oct 2004
Star Fighter 3000: The Next Generation review
Star Fighter 3000: The Next Generation was born from the 3D0 version of the original SF3K that was ported back to RISC OS and this year freed from programmers' hard discs for the platform to enjoy, writes Andrew Weston. In this review Andrew weighs up much-improved graphics and sound against playability and stability.
19 comments, latest by AW on 9/12/08 8:45PM. Published: 17 Nov 2008
News and media:
RISCOS Ltd •
RISC OS Open •
MW Software •
Advantage Six •
CJE Micros •
Liquid Silicon •
Chris Why's Acorn/RISC OS collection •
The Register •
The Inquirer •
Apple Insider •
BBC News •
Sky News •
Google News •