CMOS Battery Pack
I switched on the BBC Master this morning and was again greeted by the ‘This is not a language’ error. I’d pretty much fully expected it given that I’d already assumed the CMOS battery pack was dead.
I opened the old girl up and located the pack. Fortunately although it had leaked it was positioned such that it hadn’t caused any damage.
I don’t know whether it’s the original pack, it’s certainly pretty old, you don’t see Vidor (‘They last about a month longer’) batteries any more. In fact you don’t see much that’s made in Britain any more but that’s another story.
There are several easily found guides to building a new pack. I found this one to be very good. It explains clearly that a resistor and diode are required within the assembly to inhibit the charging circuit intended for the Lithium cells that were originally fitted, also suggesting that my pack was indeed a replacement.
I’m learning quite quickly that there’s an impressive and very active community attached to the BBC and other Acorn models.
My wallet is also slightly concerned by the amount of mods that are available, I fear my Master will soon be sporting some interesting additions.
Hopefully aforementioned community won’t see the rather Heath Robinson replacement battery pack that I hacked together. Short of parts to build a proper one and aware of the limited time left in this year’s Winter Warmup I’m afraid I resorted to copious amounts of insulating tape and reuse of the original resistor/diode assembly.
I include an image here for entertainment purposes only. It works and will see me through the next few days until I can put something a little more professional together.
Of course all this diversionary stuff means I haven’t added any code to Yahtzee and I’m wondering whether subconsciously that’s kind of intentional.
Thanks also to other Retrochallenge participant Andrew Hazelden for pointing out that the formatting in the code I’d previously listed had gone awry. This in turn led me to discover that there’s a WordPress shortcode you can wrap around code to preserve its formatting.
The original post has been duly amended.
The BBC Master that I recently snagged on Ebay has finally arrived, along with a Microvitec Cub monitor and an Opus dual disc drive unit. It arrived in a pretty grim state, the Master was fairly thick with dust and the monitor seriously grimy. I cleaned up the computer unit and will tackle the monitor tomorrow.
BBC Master Welcome Guide
I knew the sensible thing to do would be to open up the computer and give it an internal clean whilst also checking for leaked batteries and unseated chips. However I instead plugged it all in and powered it up.
Fortunately everything worked, well almost. I was greeted on the screen by the text:-
This is not a language
I made the assumption that this was down to a failed CMOS battery and restarted the machine with the ‘R’ key pressed to reset the CMOS configuration. A quick search led me to the default configuration which I entered and following a CTRL/Break reset I was up and running. My guess is that I will be presented with the same issue when I next power up and a battery replacement will be in order.
In Working Order
A fair pile of old and pretty tatty disks also came with the computer so I attempted to read a few them with no luck. It seemed inevitable that some of them would have failed but I was surprised that I was unable to read any of them. Another quick search led me to realise I needed to change from the ADFS to DFS filing system to read them.
I successfully formatted some new disks in both 40 and 80 track mode but have as yet had no luck copying files backwards and forwards between the dual drives. I’m also having no luck using Omnidisk to transfer disk images onto floppy but I shall persevere.
Ideally I’d like to get the Yahtzee code transferred onto floppy so that I can continue development on the Master and relive the school computer studies class experience as closely as possible.
On the other hand I can imagine spending the last few days of the challenge cleaning up computer and monitor, replacing the battery pack and possibly installing some sort of solid state disk drive.
I’m still awaiting the arrival of my BBC Master and have therefore been coding using the excellent BeebEm emulator. Obviously it wasn’t long before I was distracted and started downloading various disk images from Stairwaytohell. After a few rounds of Pacman, Frogger, Defender and Elite I managed to finally knock out something useful.
Having now read the full instructions for Yahtzee, it seems that my original decision to require the player to input their score wasn’t quite such a cop-out as I’d originally thought. The scoring system is in fact quite complex and different scores can be attributed to the same roll of dice depending on tactical decisions made by the player in order to complete their score card.
Given this and the time that I have available I think a compromise might be in order. Initially I shall attempt to write a procedure that will calculate the highest available score and attribute this automatically to the player.
I decided the first stage of this process should be to write a procedure to sort the rolled dice in to order. I settled on a rather brute force ‘bubble sort’ approach. This is what I came up with where V is the value of the die:-
2010 FOR PASS=1 TO 5
2020 FOR SORT=1 TO 4
2040 IF V(SORT)<V(SORT+1) THEN ST=V(SORT)
2050 IF V(SORT)<V(SORT+1) THEN V(SORT)=V(SORT+1)
2070 NEXT SORT
2080 NEXT PASS
It works, but it’s pretty unsubtle and will run to completion even if the dice are sorted in the first place. Some sort of flag to recognise when sorting is complete and end the process would be ideal.
I’m slightly concerned how long it took me to work out what is presumably for most people a pretty simple piece of code. It’s no wonder I didn’t finish it in the first place, though I would like to think my mind was somewhat more nimble all those years ago.
I also found some old screenshots of other student’s projects that I’d attempted to take with a Minolta SLR, with limited success:-
Ski by Simon Howard(?)
Magazine Database by David Tournay