© nemo 2016-2021

Things concerned with the workings of the Wimp

DataOpen template mode

!5Launcher 1.02 (13 Aug 2020)

The DataOpen message has a little-supported, never-documented “template mode” used for launching temporary files, help files, template files (not Template files you understand) and so forth – anything that you don’t want written back to where it was loaded from. Acorn supported it from RISC OS 2.00, but only in !Edit and !SrcEdit for some reason and it faded from memory, which is a great loss because it’s rather useful.

DataOpen template mode is selected by setting the unsafe flag to -2. I have supported it on all my editors for years, and I recommend you do too, it’s very simple – if you load a file in a DataOpen and unsafe=-2, reduce your filename to just the leaf... that’s all! I have patched Zap to support it. It’s also the best way of opening help files that you don’t want the user to accidentally change.

This is a file launcher (like a mini-Filer) which allows you to test your DataOpen template mode support. As a bonus, if the DataOpen is ignored (because there’s no suitable program running already) it attempts to launch a suitable editor and tries again. This will not always be successful because Alias$@RunType variables are not necessarily effective without a filename (do try to ensure that yours are though). However, this is just a bit of bonus behaviour (simulating the Filer in effect) – it’s perfectly acceptable to simply open a query window and complain if no suitable editor is running.

If you want to learn more about the Data Transfer Protocol there is a long article here.

Desktop state saver

!SaveState 1.02 (30 Oct 2020)

Before !Boot gained its Choices directory, you were expected to save your desktop state from a save dialog on the Task Manager. That has disappeared in some OSes which is a shame, as the resulting file is often useful when cut down. For example, you can run a set of development tools, save the state, and then cut out everything but the commands to run (and configure) those tools and hey presto, you have a little “Desktop” file that’ll launch all the programs in one go.

Anyway, even if one only used it once a year, I object to functionality being lost just because somebody thinks that they know better than you what you want to do with your computer.

!SaveState allows you to save the Desktop state, just like it used to work. In fact it’s slightly better than the old implementation, because it labels which program has output commands into the file, or whether they’re from modules. This makes it rather easier to separate out the bits you want from the rest of it.

Wimp_TransferBlock is 1337HAXOR or something

BlockTransfer 1.01 (06 Sep 2020) [32bit]

Wimp_TransferBlock is a security nightmare. Now this is like complaining about the size of one of the holes in a colander, but considering its entire purpose is to allow any program to read and write the memory of every other program, there’s no avoiding the unnecessary overpowered nature of the call. It exists primarily to allow RamFetch to be implemented, but it does far too much for that (and doesn’t check for even trivial errors). It’s dangerous.

This module defangs Wimp_TransferBlock so it can only be used with permission. This means RamFetch still works, but any other nefarious use does not. It also prevents a task writing outside the RamFetch buffer.

Inevitably this prevents some debugging tools from working, like Zap’s Read Memory window, but what do you expect. Computer now says No.

Please don’t mistake this for any kind of security whatsoever.