• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Retro Rendezvous

Connect, Collaborate and Code

  • Home
  • Recommended Resources
  • Retro Shop
  • About Me
  • Contact Me

Paul Bussey

The Hobbit : Exploring the Wilderland

February 19, 2024 by Paul Bussey

My next BASIC coding project is to squeeze a very simplified version of the classic text adventure game “The Hobbit” by Veronika Megler, Philip Mitchell and David Johnston into a BBC Basic program. This would be for a 32K BBC Model B. I’ll be using the Owlet editor in the main and cross checking the code on my own BBC Micro.

See this Stardot forum post for progress on this project

Like many of you, I enjoyed this landmark game and it stuck in memory. I coded some of my own text adventures at the time and was fascinated with the process….certainly nudging me towards a database programming career later on in life. Let me know some of your own memories, experiences with this game – I’d like to hear them.

This project is mostly for nostalgia, but also taking on the challenge of squeezing a very simplified form of this landmark game into a BBC Basic version. Like many retro coding projects you think …. “Why not?”

My objectives are:-

1. To represent every location in the game in BBC basic, using tokens for the common words to save space.
2. To navigate between all the locations using the original mappings (though I may exclude the random-like maddening mazes such as the Dark Stuffy Passage)
3. To emulate the split screen user interface that the Hobbit had, with input text in the bottom quarter of the screen and output text in the top.
4. To keep everything in one program, not reading other files.

If there’s any memory left (I’ll use MODE 7) then we’ll see what else could be added. It would be fantastic to include NPCs wandering around the game map randomly, such as Thorin and/or Gandalf, so you could meet them as you wander.

My objectives are not:-

1. To have a clever parser. It’s just to input directions, to allow an easy exploration of the Wilderland.

Resources

The book “The Guide to Playing the Hobbit” by David Elkan (which I used to own) which gives a great breakdown of the game (from the internet archive)
https://archive.org/download/guide-to-p … Hobbit.pdf

Veronikia Megler’s website (one of the original authors of the game) includes some really useful information:-
http://veronikamegler.com/WL/wl.htm

– A map
– Room Database dump of the locations
– Even a rudimentary Spectrum emulator, displaying the state of the elements in the game

Using ChatGPT (ver 4)

For this project I’ve been using ChatGPT to start to compile the word tokens and the locations converted into text with token indexes inserted. It’s done quite well with this. I asked ChatGPT to look at this list of locations and pull out all common words that are greater than two characters:-

Beorn’s house
The Bewitched gloomy place
A big cavern with torches along the walls
A bleak barren land that was once green
The cellar where the king keeps his barrels of wine.
A comfortable tunnel-like hall.
A dark dungeon in the elven king’s halls.
The dark stuffy passage
The dark winding passage
The east bank of a black river
The elven king’s great halls
An elvish clearing with levelled ground and logs
The empty place
The forest
A forest of tangled smothering trees
The forest road
The forest road
Forest river
The front gate of the Lonely Mountain
The gate to Mirkwood
A gloomy empty land with dreary hills ahead
The goblins’ dungeon
The great river
The green forest
The halls where the dragon sleeps
A hard dangerous path in the Misty Mountains
A hidden path with trolls’ footprints
Inside the goblins’ gate
A large dry cave which is quite comfortable
A little steep bay, still and quiet, with an overhanging cliff.
The Lonely Mountain
Long Lake
The mountains
A narrow path
A narrow dangerous path
A narrow place with a dreadful drop into a dim valley
Outside goblins’ gate
A place of black spiders
Rivendell
The ruins of the town of Dale
The running river
A smooth straight passage
A strong river
The treeless opening
The troll’s cave
The troll’s clearing
The waterfall
The west bank of a black river
The west side of Ravenhill
A wooden town in the middle of Long Lake

Common words (tokens) that ChatGPT found (here shown stored in DATA statements):-

800 DATA “the”,”with”,”river”,”forest”,”place”,”gate”,”path”,”dark”,”passage”
810 DATA “black”,”goblins'”,”narrow”,”gloomy”,”land”,”green”,”where”,”comfortable”,”dungeon”
820 DATA “elven”,”king’s”,”bank”,”great”,”halls”,”clearing”,”and”,”empty”,”lonely”
830 DATA “mountain”,”dangerous”,”mountains”,”cave”,”long”,”lake”,”town”,”troll’s”,”west”

…and the resulting location descriptions with indexes inserted representing the word token (this was also generated by ChatGPT):-

900 DATA Beorn’s house,01 Bewitched 13 04,A big cavern 02 torches along 01 walls,A bleak barren 14 that was once 15,01 cellar 16 01 king keeps his barrels of wine.
910 DATA A 17 tunnel-like hall.,A 18 dungeon in 01 elven king’s halls.,01 18 stuffy 09,01 18 winding 09,01 east 20 of a 10 03
920 DATA 01 elven king’s 22 halls,An elvish 24 02 levelled ground 24 logs,01 25 04,01 05,A 05 of tangled smothering trees
930 DATA 01 05 road,01 05 road,05 03,01 front 20 of 01 Lonely Mountain,01 20 to Mirkwood
940 DATA A 13 25 14 02 dreary hills ahead,01 goblins’ dungeon,01 22 03,01 15 05,01 halls 16 01 dragon sleeps
950 DATA A hard 18 20 in 01 Misty Mountains,A hidden 20 02 trolls’ footprints,Inside 01 goblins’ 20,A large dry 31 02 is quite 17,A little steep bay, still and quiet, 02 an overhanging cliff.
960 DATA 01 Lonely Mountain,Long Lake,01 mountains,A 12 20,A 12 18 20
970 DATA A 12 04 02 a dreadful drop into a dim valley,Outside goblins’ 20,A 04 of 10 spiders,Rivendell,01 ruins of 01 34 of Dale
980 DATA 01 running 03,A smooth straight 09,A strong 03,01 treeless opening,01 troll’s 31
990 DATA 01 troll’s 24,01 waterfall,01 west 20 of a 10 03,01 west side of Ravenhill,A wooden 34 in 01 middle of Long Lake

Location Exit Data

Each location has data in this format:-

“01202807506605103”

The first two digits are the location, followed by at least one group of 3 digits.

Each 3-digit block represents an exit, with the first digit for the direction (1 for North, 2 for Northeast, etc., 0 for Down, and 9 for Up) and the next two digits for the destination location number

I had ChatGPT read “The Guide to Playing the Hobbit” and had a go at creating the exit data, but it’s pretty bad – and this needs redoing by hand!

I need to:-

a) Resolve a bug with unpacking the room descriptions properly. It doesn’t convert the token value that lies at the end of a location description string into the corresponding word.
b) Go through all the exit data to check and replace as required (done)
c) Allow the input of directions to include shorthand as well as longhand for the directions (North and N for example).
d) Cross check the common word token replacements. I think ChatGPT has made some mistakes.

Filed Under: Uncategorized

The Lords of Midnight : Landscaping

December 6, 2023 by Paul Bussey

The Lords of Midnight was a popular and epic graphic adventure game by Mike Singleton for the ZX Spectrum (and other platforms – but not for the Beeb) originally released in 1984.

Here’s a few screenshots of what it looked like:-

Image
Image

I never completed the game but did remember these landmark graphics. The technique that the author Mike Singleton used was “Landscaping” – using scaled graphics shown as a first person perspective view. It was unique at the time – definitely moving computer graphics forward several notches.

The challenge I’ve set for myself is can this be done on the Beeb with Basic? I’m only interested in getting as far as having a grid of locations, the player being able to move in one of the 8 compass directions and having a simple landscape view implemented.

The code I have developed so far is in a link at the bottom of this post which includes:-

1) The player grid set up, currently 16 x 16. Each location has a number representing a tree or mountain or just an empty space. The player grid is displayed at the moment for diagnostic purposes, showing the position of the player, with a note at the top of the screen showing which direction the player is facing.
2) The player being able to look in one of the 8 compass directions (using numbers 1-8) and move with the key “m”.
3) Some procedures to draw scaled mountains and trees. (adapted from graphics code with thanks to Dominic Pajak) . The current code just shows a demo of these scaled graphics being used.

This is an example of scaled graphics I have developed so far. The tower from the code below has been removed for now to save memory.

Image

I have a Graphics Extension ROM (GXR) – so am using some of this extended command set in my code.

The big challenge is being able to represent the “landscaping” technique. I suspect this will be quite challenging squeezing it into memory, but I want to give it a go.

Luckily this technique is outlined in detail on this web page (see below), where Christopher John Wild has put a lot of work into understanding the game and breaking it down.

https://www.icemark.com/tower/landscaping.htm

Here’s my Mode 1 version, where I’ve gotten to the point with displaying three elements; mountains, trees and towers shown in a perspective mode. The player grid is shown as a 15 x 15 grid. Use N,E,S and W keys to face in different directions and the “M” key to move one square.

The following link will take you to the Owlet editor with the code.

This link is a post in the stardot forum outlining the progress of the code, with other forum members contributing and adding to the graphics.

This is the final version.

Filed Under: BASIC Programming Tagged With: Graphics

Notes on Owlet – A Modern BBC Basic Editor

November 24, 2023 by Paul Bussey

Owlet is a welcome modern editor for BBC Basic since editing Basic on the original BBC Micro was clunky and slow. Try it here with this example of “Space Probe” a game I’ve written recently.

A Trip Down Memory Lane

In a remarkable fusion of past and present, a trio of innovative programmers – Dominic Pajak, Matt Godbolt, and Kieran Connell – have breathed new life into a classic piece of computing history. Their project, the BBCMic.ro editor, also known as Owlet, is not just a nod to nostalgia; it’s a full-blown resurrection of the BBC Micro.

The Power of Emulation

The Owlet emulator is a marvel that runs BBC Basic right in your browser, encapsulating the essence of the original BBC Micro. But that’s not all – the team has also introduced the BBCMicroBot, a tool that can execute BBC Basic code and display the results in a tweet, merging the old with the new in a way that’s both ingenious and inspiring.

Inspirations and Creations

Dominic Pajak, in explaining the motive behind this project, said it was about “bringing back to life a classic 80s computer that inspired a whole generation in the UK.” This emulator has become a canvas for creativity, with users creating everything from pixel art to fractals. Notably, Raspberry Pi founder Eben Upton has even contributed an implementation of Conway’s Life in 6502 machine code, showcasing the emulator’s capability to handle complex computations.

A Platform for Experimentation

Pajak and his collaborators view this emulator as more than just a tribute to the past. They believe it encourages experimentation, much like Raspberry Pi and Arduino do for the current generation of developers. This philosophy is evident in the emulator’s design, which includes a 10GHz 6502 emulator on the backend. This feature dramatically accelerates the computing process, allowing users to accomplish in seconds what would have taken an entire night on the original BBC Micro.

The Best of Both Worlds

The BBCMic.ro editor and the BBCMicroBot represent a unique intersection of retro and modern computing. They offer a glimpse into the past while providing a platform equipped with the speed and efficiency of today’s technology. This project isn’t just about reliving old memories; it’s about creating new ones, using a piece of history as the foundation for new learning.

Some Discoveries

  • When running BBC Basic on this emulator, don’t forget to click into the right hand window in order to interact with the screen.
  • When using Random numbers in BBC Basic, the Owlet environment will end up giving you the same number on each run. When running the same code on a machine, random numbers behave better!
  • The GXR (Graphics Extension ROM) is standard in this emulator, which a normal BBC Micro B wouldn’t have. When I was using commands to draw circles or elipses, such as the planet in the graphic above, I wasn’t aware that this was an extended graphic command, so the code didn’t draw the planet at all on a native machine.
  • When clicking on items in the gallery of examples, they don’t seem to load and seem to suppressed by having your current coding project reload instead (this at least happens in the Chrome browser)
  • Owlet can contain the whole code of your BBC Basic program in a link – so easy to share your programming projects on a forum for example.
  • Owlet can save your code as a SSD (Disk image) ready to copy onto a USB memory stick, to be read by a GOTEK device. So Owlet is ideal for development and transfer of programs back to the original machines.

Filed Under: BASIC Programming

Solid State Storage for a BBC Micro

November 10, 2023 by Paul Bussey

My BBC Micro B came with a solid state storage device, allowing a Micro SD card to provide many of the original games published for the Beeb in the 80s. It was fantastic to have this included and great to have any of these games load in a split second. Fast, reliable solid state storage. No more dodgy tapes, floppies or clunky disk drives! The filing system code is supplied on EPROM – so taking one of the available ROM slots.

The solid state storage is known as MMC.

When I opened up the BEEB to see how the MMC SD Micro card was mounted I discovered this:-

The 1GB SSD card can be ejected, but the trouble is that there is a capacitor right next to it (as pointed out in the image) that prevents it from being pulled out of the slot. I haven’t tried that hard to do that, not wanting to risk damaging anything. But it’s pretty much blocked in.

It seems an odd mounting position that prevents the SD card from being taken in or out. Perhaps it’s the only sensible place where it can be mounted.

My objective at the end of the day is to have an easy and accessible way to transfer files between a Macbook Pro (where I could create programs for a BBC B on an emulator) and the Beeb but the current MMC facility doesn’t look to serve me for this.

Plus how robust would an SD card be being pulled in and out from this board multiple times? It wasn’t made for this kind of use I suspect. Plus it was the pain of lifting off the computer cover every time I needed to transfer the file, even if the MMC SD card was mounted in a different place.

In the end I decided to gain a GOTEK device from RetroClinic.com (see the eBay shop site as well) This is a USB Floppy emulator drive, where you could store hundreds of floppy disc images on one USB stick. A GOTEK device can be used with various retro machines, but this example has been especially configure for use with BBC Micro / Master / Electrons. This is the later type AT435 GOTEK USB Floppy emulator, equipped to connect to the Disk Interface port. This version has a faster CPU with more memory, and a larger 3 line screen, to make seeing the image and folder details easier

A selector on the front of the GOTEK allows you to choose and mount your floppy disk. It’s an external device that you can sit on top of your BBC Micro. The USB stick allows you to easily copy SSD (Disk files) from a PC or MAC which can be read straight away by the BEEB.

Best of all RetroClinic provides a preformatted Sandisk USB stick with many games and utilities for multiple Acorn machines.

For example the Owlet BBC Basic online editor, has a built in option to write your code to an SSD disk file – ready to transfer to a USB stick. It’s a great solution for allowing you to do most of the editing and testing of code on a modern machine and then finally doing final tweaks and RUNs on the BBC Micro.

Filed Under: BBC Micro B, Hardware Accessories Tagged With: GOTEK, MMC

Programming Project : Space Probe

October 30, 2023 by Paul Bussey

Back in 1986 I coded a game for the ZX Spectrum that was published in Popular Computing Weekly. Remember that magazine, where you could type in Basic programs and perhaps get them to work?

In this thread I’ll be working on converting this to BBC Basic as part of my relearning of this language.

For anyone else that may have published their BASIC programs during that time, there’s two useful archives here:-

1. Index for Spectrum/QL typed in scripts : http://www.users.globalnet.co.uk/~jg27p … _names.htm
2. This archive is from the “World of Spectrum” but the mag covers all scripts from different machines of the time. https://worldofspectrum.org/archive/mag … ing-weekly

Here’s the original mag and published page:-

Image
Image

I’ve been using the excellent Owlet editor on my Mac (I can type faster on a modern keyboard) and my first question is on the use of RND, which is very much prevalent in the code above which I’ll need in the BBC script.

I’ve noticed in Owlet that when using RND(X) it ends up giving you the same number each time, unless you have some code asking for input at the beginning (providing a random time spanned event at the start).

Here’s my finished script which ends up being better than the 1986 version.

Use this link to see and run the BBC Basic script.

Filed Under: BASIC Programming, BBC Micro B

Using a BBC Micro B with an HDMI Monitor

October 13, 2023 by Paul Bussey

In my last post, I had this question left unanswered.

  • Could I somehow use the Beeb with a modern display?

Some Acorn aficionados like the idea of pairing their Acorn machine with original monitors from the same period, notably the Microvitec Cub colour monitors. Personally I wanted a space saving and clear display, that I didn’t have to worry about repairing later down the line. Besides, the Cubs cost a pretty penny – fetching between £200 and £300 at the time of writing.

After searching if the BBC B could support a modern display, I quickly came across this YouTube answer from Retro Computer Shack showing how to connect to a display with an HDMI input. This provides a crisp display on a monitor or TV, using a RGB to SCART cable (£13.50) plus a SCART to HDMI video converter (£29). I went with the advice to get this more expensive converter (Prices at time of writing), since I could see from Amazon feedback the cheaper converters were giving problems.

What was trickier was getting hold of a monitor (rather than a TV) with an HDMI input which from reading from a few sources are a little harder to get hold of nowadays. I got hold of a Dell 19″ HDMI Monitor IPS LED 1280 x 1024 P1917S P1917SF from eBay seller UK Computer Parts which do have a 100% feedback rating. When I received the monitor it was packed adequately but hastily, with some of the packing tape coming off the misshapen box. The fuse was also missing from the plug which caused a bit of initial alarm when I tried switching it on, but once a fuse was put in, the monitor was fine and in good condition.

So the answer to the above is that the Beeb can use a more modern display. You could use of course a display with a SCART input (more common with TVs) saving on having an adaptor – it depends on your preference.

Filed Under: Uncategorized Tagged With: Display, Monitor

Primary Sidebar

Footer

The Venue

We meet at the Falkirk Business Hub.

Learn more about it here

The blog

Learn about my “rediscovery” of the BBC Micro B here in my blog

Recommended Resources

As I discover them I’ll be logging useful resources for Acorn machines HERE.