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.

Lunar Eclipse Jan 2019

This morning, I woke up at 4am, dragged my geeky body out of bed, grabbed a coffee and braved the freezing Yorkshire air to observe the eclipse.

Our ancient ancestors had various explanations for the eclipse or blood moon. The Chinese thought that an eclipse was caused by a giant cosmic toad-like dragon; the ancient Mesopotamians though that it was an attack by demons; the ancient Mayan civilisation thought that the moon was eaten by a jaguar; while the Egyptians assumed it was a beastly cow that was to blame.

Although we now know that a lunar eclipse is caused by the full moon crossing the plane of the ecliptic, the explanations of demonic animal attack described above are still more accurate than the best explanations of the most gifted flat-earth astronomers, who, to date, have failed repeatedly to provide a model for their flat earth belief. Although it is lamentable, that 2% of the population claim to believe that the earth is flat, this is not a post about how wrong flat earth supporters are. If you want to read about flat earth, I suggest this post.

I wanted to create this post to show the two apps I use for predicting eclipses, one old, one new, or in other words, how did I know that I needed to wake up at 4am this morning (and not as my colleague put it, 'I was coming to work this morning and I noticed that the moon looked a bit funny')?

My trusty go-to eclipse app on the BBC Microcomputer
The first app is 'eclipse' for the BBC Microcomputer. It reliably predicts lunar eclipses, even showing start times and end times with a graphic. The image shows the path of the moon (small circle) through the Earth's shadow (big circle). I still run this on my trusty BBC Micro. I think that it came on a Beebug magazine once. I am always impressed with its accuracy (EDIT image shown is NOT from this morning).

The second is Eclipse Guide developed by Vito Technology, Inc. who also developed the wonderful Sky Walk 2 app. This app is ostensibly a new and improved version of the app above, with better graphics, maps and a bit more information, oh and you can carry it around in your pocket.

Eclipse guide, showing handy information, such as when you need to go outside to freeze and when you need to get excited and tell people who are currently inside to come outside, and when to tell people that it is too late, they have missed it.

Skipping ahead to the near future, this is the app with details about a future solar eclipse, unless you are reading this in the future and the eclipse has already happened.
Well, that's it for today, suffice to say that the eclipse was a beautiful sight to see and I am looking forward to the next one, albeit partial on the 16th July.

If you are sticking around and have nothing better to do, then you might like to look at some similar posts from the history of this blog.

Search for the most precious substance in the universe


Who thought it was unobtainium?

Riemannian is a text-based space adventure game written in BASIC. I am not certain of its origins but it was converted to BBC BASIC by Janny Looyenga (and I think it was released as either a Beebug, or an Acorn User magazine disk).

I have just spent my afternoon converting it to run on the Raspberry Pi under RISC OS and subsequently on the PC under BBC BASIC for Windows.

In Riemannian, you control a spacecraft, which teleports randomly around a text-based Teletext universe. You have three resources that need to be managed: oxygen, fuel and provisions. Your quest requires you to mine as much of the elusive riemannian ore before your resources run out and you are unceremoniously dumped back to the BASIC prompt.

On your journey, you will encounter aliens, both friend and foe. Some will wish to sell you commodities, whilst others try to blow you away with their laser guns and robot slaves. There are also some other special encounters, but I wouldn't want to spoil your fun of encountering these yourself.

This world is very notable for the Uslian tree ant and its inhabitants' exceptional loathing of sit coms

I have covered how to convert BBC microcomputer programs to RISC OS BASIC programs in another post.

The main problem I had to overcome is the fact that, in Riemannian, much of the gameplay is time-based. You have to press the right key at just the right time to zap an alien or mine the planetoids. Upon inspection of the code, two facts became obvious. Firstly, the code was a horrible mess of spaghetti (probably indicating that it originated on a less elegant 8-bit machine to the BBC micro) and second, much of the timing revolved around how many loops the computer could perform whilst waiting for your input. As my target machine, the Raspberry Pi, is a much faster machine, I had to alter these timing loops so the original gameplay was restored. I think I have managed whilst also making the game a little more forgiving than the original.

From a time when mining was much more about guesswork (just like modern Fracking).

+1 Geek Experience Point awarded to by Janny Looyenga for the original BBC BASIC conversion.

I am going to assume that due to its age, Riemannian is currently in the public domain. So you can download a copy from my OneDrive. If you are the owner of Riemannian, and it is your sole source of income, then I am really sorry and I will remove this link as soon as you get in touch.

I've provided four versions:

  • A RISC OS BASIC file
  • A plain text file containing all the code
  • A BBC BASIC for Windows file
  • A Windows executable file (it is totally NOT a virus, but if you are in doubt run it in a sandbox such as Virtual Box rather than trusting a strange blogger on the Internet).

If you enjoyed this post, then that is it, you have reached the very bottom of the Web, but you might like some other conversions of ancient BASIC programs, such as this one, or this one, but especially this one.

That's it for today. I will be back later for more geeky stuff - stay tuned!

Stuff you can do with RISC OS for Raspberry Pi

My avid reader will know that I am a big fan of running RISC OS on Raspberry Pi.

I have already written a post answering whether you can use RISCOS as your main computer. The answer was yes (sort of). If you were not convinced then this is a post about stuff you can get your RISC OS Raspberry Pi computer to do right away.

Never forget to go to work again!
Shown above is the alarms section of the clock application and it is a surprisingly good alarm system. You can set multiple alarms, including specific dates of the year on various recurring patterns. There are two things I like about this. First, by having it in the 'run at startup' folder you get an analogue clock with seconds hand in your icon bar - as close to a 'live tile' as you will get in RISC OS Pi. Secondly, you can have multiple alarms (I am not sure what the maximum is) and alarms can seemingly be set years (months, weeks or days) into the future. There are options for 'working week', 'repeating alarms'. There is a 'Task Alarm' which allows you to boot up another RISC OS Pi app at the particular time of the day - for example, to load the radio player just in time for the shipping forecast. Simply drag the appropriate app into the alarm dialogue box. This includes your own BASIC programs as well (rather exciting, no?) Repeating alarms can be programmed to run on particular intervals, or on the first Sunday of each Month.



Calculator
As you might expect, RISC OS has a calculator app, and it is as good as any you will find on your 'other' desktop machine or phone. Shown here is the programmer's calculator should you need to perform a left shift on a nibble, or whatever.



Happy New Year! What? Not another one!
As desktop calendars go, it is not as good as Window's 10 calendars with Outlook integration, but if you need to know the date of the next Friday before payday, then this will do plenty. It is also highly customizable, and I think the result looks good. Some operating systems don't even have a desktop calendar - I'm looking at you, ChromeOS!



NetRadio - highly recommended. 
My longtime reader will know that one day I hope to have a second reader on this blog. They will also know that I like to listen to a wide range of music as I sit back and relax with some knitting. The NetRadio app turns your RaspberryPi into an internet radio (oh, and before you ask, I don't record the top forty onto compact cassettes anymore, honest).



It's notepad
One of the main roles for my Raspberry Pi is to simply keep notes, records, and calculations. Between the simple but powerful StrongEd text editor (shown above) and PipeDream, RISC OS has this basic computing job covered. Pop over to the task window (F12) and you can navigate your text file library using the *BUILD <filename> and *TYPE <filename> commands. This, obviously, makes you feel more like a hacker even though you are really just writing your thank you letter to Santa. StrongEd is a little more than Notepad for RISC OS, featuring spell checker, split screen and various other features for the power user to enjoy.



Sometimes you need to know the distance to the shops in astronomical units.

Convert is my go-to app for converting various units. There are loads of units available, I'm just showing a small selection of the 'less common' ones.



Brrrr
Weather UK is an app for showing simple weather data for various cities in the UK.The data comes from the BBC weather feeds and clicking on the text will bring up a forecast in your browser.

And that's not it! One really awesome feature (for me at least) is that RISC OS will run most of your favourite BBC BASIC applications. I have already written a post all about this and I am currently in the process of converting various files from my BBC master 128 onto the Raspberry Pi. No doubt I shall be back really soon to write about this.

If you enjoyed reading this post, then do please share it with your friend. It would be great to have two readers! If you don't have a friend, then no worries, you might like to read about data logging on Raspberry Pi, or something random but similar.

Until next time...

Lego city cargo train

Well, I know I haven't posted in a while. Life has thrown up some interesting challenges and upheavals over the last nine months, but my new year resolution is to get this blog back up and running and make it geekier than ever.

So, in the interest of sharing something geeky for the new year, here is my most recent project, the Lego city cargo train.





Lego city cargo train under construction:

A dozen or so bags of stuff! You will need about four hours to build this set or a few friends to help.

It begins!

It began

Customary shot of Lego pieces scattered around

The beginnings of a very garish looking base. This will become the engine carriage.

The engine carriage under construction.

Almost there

Adding the 9V power supply

The almost complete engine

One of three cargo carriage sections.

More space for cargo

I love the detail on this


Lego city cargo train comes with enough track for a reasonable oval circuit, however, I've added some extra track pieces so the whole route is a little longer.


Some videos of the train in action. First sped-up:


And another one here:


I hope you enjoyed this Lego post. If so, you might like to see these other Lego posts, or this Lego Millenium Falcon, or TARDIS. Maybe you just want something completely different.

Label