[Rpcemu] Patch for 0.9.1 - Mac keyboard support

Timothy Coltman lists at maemagel.com
Mon Nov 19 11:43:18 PST 2018

Hello all

Please find attached a ZIP archive (169K) containing a patch for RPCEmu 0.9.1 that implements keyboard support for OS X/macOS.  The file contains a patch in unified diff format ("rpcemu-0.9.1-mac-v1.patch") plus a folder ("macosx") containing the icons for the Mac's dock.  This should be unpacked in the "src" folder and the patch applied from there.

This is a development of the same patch that I had previously posted on the Stardot forums (where I used to post as "VincentVega"), and incorporates some of the suggestions made there.

Once compiled, a Mac RPCEmu application will appear in the top-level "rpcemu-0.9.x" folder.  Double-click in the normal way to run.  You can compile the interpreter or dynamic recompilation versions - both work on a Mac.  The patch has been developed on "Sierra" 10.12.6 - it should hopefully work on all later versions.

When you run the application for the first time, it will prompt you to configure a directory where the emulator can expect to find the various files it needs to run, such as the RISC OS ROMs, hard drive images and so on.  This allows you to copy the RPCEmu application into the "/Applications" folder if you want, but keep the other files in a separate location in your home folder.  Once you've selected a folder with the "Select" button and pressed "OK" the emulated machine will start as normal.  If you want to change the folder at a later date, hold down the "Cmd" key as the application starts.  You can also delete the "~/Library/Preferences/org.marutan.rpcemu.plist" file.

There are a few things to note:

1. The keyboard mimics that of a RISC PC, so the key to the left of "Z" is blackslash/pipe and the one to the left of RETURN is hash/tilde.
2. There are a few quirks with the keyboard: SHIFT-3 produces an anged bar; pilcrow (to left of "1") produces a pound sign.
3. F13/F14/F15 on a standard Apple aluminium keyboard are mapped to "Print Screen/SysRq", "Scroll Lock" and "BREAK".  "Fn" should be mapped to "INSERT".
4. The patch uses virtual key codes and assumes a UK keyboard layout.  There is support for other keyboard layouts, but needs these to be defined in the "keyboard_macosx.c" file (there is a very basic French layout defined that swaps "Y" and "Z").

Please note that there is no networking support.  I did try and get it up and running, using some of the code from the "Caliston" builds of Francis Devereux and whilst it did look promising at one point (I could ping from one end), I wasn't able to get it to work fully.

Any comments and suggestions would be appreciated.  If anyone wants binaries (so they don't have to compile), please let me know and I'll make some available in due course.

Many thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rpcemu-0.9.1-mac-v1.zip
Type: application/zip
Size: 169311 bytes
Desc: not available
URL: <http://www.riscos.info/pipermail/rpcemu/attachments/20181119/9631dda2/attachment-0001.zip>

More information about the RPCEmu mailing list