RISC OS web server

If you have read this blog before (and I am pretty sure at least one person has) you will know that I am a big fan of RISC OS on Raspberry Pi.

RISC OS is an operating system that has the 'look' of  Linux and the 'feel' of the BBC microcomputer. I have delved into various aspects of RISC OS Pi before.

Whilst looking for web server solutions for RISC OS, I recently discovered WebJames. WebJames is a server with an integrated PHP interpreter. It is available in the PackMan package manager and it is really easy to use. In this post I will show you how to set it up (really easy) and get going as a hoe server.

Once you have finished installing from PacMan, all you need to do is provide a folder called 'Site' and you are good to go.
Packman installs WebJames into :0.$.Apps.Web, however, you can easily move it to any location you like. As most of my files are stored on a removable USB stick, I've put WebJames there. This has got to be the simplest web server ever. No complex configuration; no mucking about with Linux; simply launch the server and point it at some HTML files. As long as WebJames is running on the pi it will dutifully listen on port 80 for any requests.

PackMan (not Pac-man)
There is also an example code package which is worth exploring.

I've only just scratched the surface of what we can do with WebJames, but I am certainly glad it exists.

The first thing you might want to do is create a test site. Here I have provided a new HTML file called index and placed it in the 'site' folder. The test page has a single link that opens a folder called 'files' (useful for grabbing files from the pi onto another machine).

The index test page is shown in StrongEd for RISCOS (although I actually wrote this in qedit for DOS under DOSBox for that extra geekiness).


My first test page running on my Samsung Galaxy Note. Not very exciting, just a link to a folder.

Directory listing of files on the server.

To view your web server test page on your home network, simply point your browser at http://your IP address, for example, mine is http://192.168.1.218

To view your page on your Raspberry Pi instead, try http://127.0.0.1

Well, that's all for today. We have only dipped our feet into the RISC OS server waters. I hope somebody found this a useful guide. I am certainly looking forward to doing more with this software. In fact, the Apache web server I have running on my second Pi is the only reason I actually have a second pi running at all. WebJames really makes RISC OS more and more attractive as an operating system. Oh, and did I mention that you can use BBC BASIC as a server-side scripting language?

If you enjoyed this post, then there is a slim chance you will enjoy this post about my experience of RISC OS on Raspberry Pi, or that time I installed DOSBox on Raspberry Pi, or even something completely different.

A trip to RetroClinic

I recently took my BBC Master microcomputer to RetroClinic for a bit of tender loving care. Mark did an excellent job of fitting a new cherry keyboard as the original keyboard had developed a fault. I also walked away with a new Phillips monitor which has much-improved picture quality than the old one.

Mark also sold me a copy of Wordwise-Plus. This is the word-processor I used when I was grasshopper high to a knee. In fact, I remember writing both GCSE and A-level coursework on this trusty word-processor and it even followed me to university (although it did not survive the experience).

Cherry keyboard for the BBC Master (thanks to Mark from RetroClinic). Looks like a 'beeb' keyboard, feels like a modern cherry keyboard. These keys actually feel soft. The original 'beeb' keyboards were designed to be school-level indestructible as they were intended to survive half a term with those monsters in 3B Mathematics on a Friday afternoon.

Wordwise-Plus comes from a time called '1984', when, as well as all the population being victims of perpetual war, omnipresent government surveillance and propaganda, word-processors were non-WYSIWYG. This means that in order to control the layout of your text you had to enter control codes. This was way more fun than modern word-processors with their boring icons, mouse pointer-aiming, perpetual war, omnipresent government surveillance and propaganda.

Wordwise-Plus menu in glorious MODE 7 running on original hardware and Phillips monitor.
Wordwise also had a built-in macro scripting language. When I was a youngster living on Airstrip One, I actually coded loads of scripts to perform various jobs on my school work, such as applying headers and footers, automatically creating cover pages and numbers, etc. Youngsters today don't know they are born!

One page from the extensive scripting language manual which is now my bedtime reading for the next week, even though page one warns you that this manual doesn't make good bedtime reading.
My blog: full of awesome goodness and other relics of the Cold War.

I have absolutely no doubt that you will be finding some Wordwise-plus code floating around on these pages sometime soon. I also intend to write a post about how tremendous those red BBC micro function keys are at some point (hint, they are really tremendous).

Mark performing surgery on the Beeb. That's one Speech ROM going in as well as a battery pack replacement.
Th...th..th..that's all folks!


If you enjoyed this post, then you might want to visit your doctor and explain the symptoms to him or her. If you are sticking around for a bit anyway, then you might want to read about some Raspberry Pi posts. If you hate this blog, then you will really hate this post, not to mention this one.
Public noticeboard

Public noticeboard

Last year I set up an experimental public noticeboard on Linoit and was pleased to find that people actually used it and kept their comments child-friendly. So, I have decided to keep it running. You should see a link appearing in the top right of this page.

I am not sure whether blogger will let me embed it below, but you can also find it on my other website.


Pond life

Back in 2014 I wrote a pond life simulation in BBC BASIC for Windows and promised to share the source code.

With thanks to Ed for the prompt, I have spent the morning getting it ready and it is now available for download from my OneDrive.


In this simulation, a number of 'critters' move around a world trying to stay alive. Critters eat grass, and if they don't get enough they die. Each critter is blind and moves around randomly in the hope that they will find food or a mate (they don't have Tinder nor do they have the Tesco app).

There are a number of parameters that you can play around with, including:

  • how many critters start out;
  • how likely a critter is to die of old age or hunger;
  • how quickly the grass grows;
  • how likely two critters will breed;
  • how satisfying the grass is;
  • how many critters can be born in one 'litter';
  • and more.

This simulation is intended as a bit of fun only and I hope you enjoy it. Whilst commenting the source code I have noticed at least two places where the efficiency of the simulation is really bad. I mean REALLY BAD and massive improvements are in the pipeline.

Until then, enjoying being a pond god and I'll see you for the next geeky post which I promise will be about something.

If you want more life simulations, then you might like this post, or, who knows, even these ones.

Maybe you just want to write something on the noticeboard.

DOSBox for RISC OS

I have recently discovered that DOSBox is available for RISC OS. If you didn't already know, DOSBox is an x86 emulator that lets you run all of your favourite DOS software on a wide variety of platforms - including Raspberry Pi's running RISC OS.

This post will primarily deal with DOSBox running under RISC OS, but it is hoped that my reader will immediately go and grab a copy for her own OS, if not get the wonderful RISC OS installed on Raspberry Pi, like, this minute.

How to install
Simply find DosBox in the '!PackMan' package manager. What are you waiting for?

Getting started
The first thing you will want to do is create a folder on your Pi for all of your delicious DOS programs. The next step is to map this folder to a drive in DOS.

When you first launch DOSBox, you will see the Z: drive. There is not much you can do here. The names of your drives will be different, however on my machine:

mount c SDFS::RISCOSpi.$ (maps the Pi SD card as 'C:' drive)
mount d Fat32fs.RISCDISC.$ (maps my 'RISCDISC' flash card as 'D:' drive)
mount a RAM::RAMDISC0.$ (maps the ram drive as 'A:' drive)

If you need a primer in DOS commands.

To change to a new drive, type drive letter followed by a colon:

A: (will change to drive A)

To navigate to a new sub-directory:

cd directoryName

To move up one level:

cd..

To run a program, look for a .exe .bat or .com file (and type it)

To read a text file:

type filename

To get a directory listing

dir
or
dir /p (paged mode)
dir /w (wide mode)

For more help with DOSBox, type 'help'.


The software
This is the reason you want DOSBox, to run all of that amazing software written before 1990 (before Ant and Dec were a thing and when MTV was actually about music).

I spent this morning raiding my IBM 286 PC for games and apps that I'll probably want to run under RISC OS. Here is some of my DOS software running on my Raspberry Pi:

One of the ubiquitous chess programs for DOS. This one is quite good. I'm going to let it beat me later.

I have no idea what I am doing but I'm glad I get to fly around in a spaceship that looks like it has been drawn by my ten-year-old nephew.

Dangerous Dave, no relation to Rik Dangerous, or Danger Dog.

Well Done, Dave!


Can you defeat the invaders' dastardly 'move right... then move left' strategy?

''Wilbling Wilf was a favourite of mine. Written by now computer security expert Graham Cluely @gcluely. The aim of the game is to guide Wilf through all infinity levels dopping jam from your leaky jam sandwich, whilst not getting eaten by the evil Glumphs!

Intra-Galactic Battles. I often dust this off and have a battle

Intra-Galactic Battles. Did someone say Startrek? It's okay, some of the ships look like they have been copied from Starwars too. Nevertheless, this is a truly awesome game. You choose to build ships from one of four different races and then go toe-to-toe in a slugging match of resource management against the computer.

Yay! ASCII clock and calendar. I don't know why I don't do a blog post about ASCII clocks. Oh, wait, I already have.

There is now even more reason to leave your Raspberry Pi switched on all day. Relax as you watch the virtual fish tank do its thing. Can you see the little snail?

Hello

Problems
As with most emulators, you will find some of your software does not run as expected. I encountered a few programs that would disable the mouse in RISC OS, or cause the whole system to freeze. On the whole, software tended to behave itself.

The sound emulation sometimes goes a lot wrong. Typically adjusting the emulated system speed will fix this problem. You can speed up and slow down the emulation (essential for Wilf) using CRTL+f11 and CTRL+f12.

You will also probably want to drop the resolution of RISC OS. Click on the monitor icon on the bottom right of the icon bar and select 800 x 600 for an authentic experience, depending on your own hardware.

Th...th...th...th...that's all folks!
If you enjoyed this post then you should go and get DOSBox installed on your Raspberry Pi. If you are sticking around for a bit, then you might like to read some posts about Intra-Galactic Battles, or just something completely different.

Label