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.
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.
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:-
2000 DEFPROCsort 2010 FOR PASS=1 TO 5 2020 FOR SORT=1 TO 4 2030 ST=V(SORT+1) 2040 IF V(SORT)<V(SORT+1) THEN ST=V(SORT) 2050 IF V(SORT)<V(SORT+1) THEN V(SORT)=V(SORT+1) 2060 V(SORT+1)=ST 2070 NEXT SORT 2080 NEXT PASS 2090 ENDPROC
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:-
Perhaps somewhat foolishly I’ve decided to follow in Urbancamo’s footsteps and use this year’s Winter Warmup as an opportunity to try to finish my 28 year old school project, specifically a version of the dice game Yahtzee written in BBC BASIC.
The recovery from disk of the original unfinished code has transported me directly back to 1985 and the fifth year computer studies class where a put upon Mr Rigby tried in vain to concentrate our minds on programming when we were more interested in throwing each other’s school bags out of the windows and bunking off for a fondle with the girls in the tennis courts.
What little work was achieved was done using BBC Model B computers. These machines remain very popular and still command a fair price at auction. I’ve been intending to buy one for some time and this current trip down memory lane has jolted me in to action.
I’m therefore awaiting the arrival of a BBC Master, dual disk drives and Microvitec Cub monitor with which I intend to finish my Yahtzee program. While looking for a Model B I chanced upon this listing instead which had a very reasonable ‘Buy it Now’ price.
Having looked through the code that I originally wrote I can remember quite vividly the reason the project remained unfinished. I was unable, or more likely unwilling, to figure out the necessary code to keep score, instead relying on the player to enter it manually.
Clearly this was a cop-out that needs rectifying and I will therefore attempt the figure out the necessary code and finish the program. Whether I can then get upgraded to a ‘B’ from the ‘C’ grade that I originally received remains to be seen.
A quick search for ‘Yahtzee Instructions’ led me to a PDF helpfully provided on the Hasbro site. I now need to figure out the most compact and elegant way of determining for scoring purposes which dice the player has rolled. If I can achieve that, if, I may also look at jazzing the graphics up a bit.
Here’s the original code, some of it which I now have no idea what it does:-
10 Y=0:MODE 7 20 P=1000 30 SC=0:U=0:I=0:O=0:P=0 40 DIM Q$(5):DIM A(5):DIM V(5) 50 REM YAHTZEE 60 P=0 70 CLS:DIM D(5) 80 PRINT:PRINT:PRINT 90 PRINTCHR$(141)" àÇYAHTZEE" 100 PRINTCHR$(141)" àÜYAHTZEE" 110 PRINT:PRINT:PRINT 120 PRINT" ÅBy" 130 PRINT:PRINT:PRINT:PRINT 140 PRINT" É PRESS ANY KEY" 150 LET B$=GET$:IF B$="" THEN 150 160 CLS 170 PRINT:PRINT:PRINT 180 PRINT"ÉINSTRUCTIONS(Y/N)" 190 PRINT:PRINT 200 INPUT A$ 210 IF A$="Y" THEN 1010 220 IF A$<>"N" THEN 160 230 CLS 240 PRINT:PRINT 250 PRINT"ÑPLEASE ENTER YOUR NAME" 260 INPUT A$ 270 PRINT:PRINT"ÅTHANKYOU" 280 CLS 290 PRINTCHR$(141);" ÖYAHTZEE" 300 PRINTCHR$(141);" ÇYAHTZEE" 310 PRINTCHR$(141);" Å=======" 320 PRINTCHR$(141);" É=======" 330 PRINT:PRINT:PRINT 340 PRINT"ÅPLAYER ONE IS ";A$ 350 PRINT:PRINT:PRINT 360 PRINT"ÜPress any key to play" 370 LET B$=GET$:IF B$=""THEN 370 380 CLS 390 Z=Z+1 400 PRINTCHR$(141);"Ç YAHTZEE" 410 PRINTCHR$(141);" ÜYAHTZEE" 420 MODE 5 430 COLOUR 1 440 PRINT:PRINT 450 PROCcubes 460 L=0 470 FOR L=1 TO 5 480 LET Z=INT(RND(1)*6)+1:LET V(L)=Z 490 ON Z GOSUB 880,900,920,940,960,980 500 PRINT 510 NEXT L 520 C=1:REM counter 530 FOR F=1 TO 5 540 PRINT TAB(1,25);"HOLD ";F;" ?" 550 INPUT A$ 560 IF A$="Y" THEN LET A(F)=1 570 IF A$<>"Y" THEN LET A(F)=0 580 NEXT F 590 FOR F=1 TO 5 600 LET Z=INT(RND(1)*6)+1 610 IF A(F)=0 THEN LET V(F)=Z 620 NEXT F 630 CLS 640 FOR F=1 TO 5 650 PRINT 660 ON V(F) GOSUB 880,900,920,940,960,980 670 NEXT F 680 IF C=2 THEN GOTO 710 690 LET C=C+1 700 GOTO 530 710 PRINT "GO ON?" 720 INPUT X 730 MODE 7 740 PROCscores 750 V=V+1 760 IF V=6 THEN GOTO 1420 770 GOTO 420 780 PRINTTAB(0,0) 790 RETURN 800 PRINTTAB(0,20) 810 RETURN 820 PRINTTAB(0,40) 830 RETURN 840 PRINTTAB(0,60) 850 RETURN 860 PRINTTAB(0,80) 870 RETURN 880 PROCone 890 RETURN 900 PROCtwo 910 RETURN 920 PROCthree 930 RETURN 940 PROCfour 950 RETURN 960 PROCfive 970 RETURN 980 PROCsix 990 RETURN 1000 INPUT F 1010 CLS 1020 MODE 7 1030 PRINT:PRINT:PRINT"ÅYAHTZEE INSTRUCTIONS" 1040 PRINT:PRINT"É Yahtzee is a simulated dice throwing" 1050 PRINT"Égame for one player." 1060 PRINT"ÉThe player shakes his dice." 1070 PRINT"ÉAfter shaking you may pick up any" 1080 PRINT"Éamount of the dice you wish and shake" 1090 PRINT"Éagain until you are satisfied with" 1100 PRINT"Éyour score.You may do this twice after" 1110 PRINT"Éyour first shake." 1120 PRINT:PRINT:PRINT"ÑPRESS ANY KEY" 1130 LET B$=GET$:IF B$="" THEN 1130 1140 CLS 1150 PRINT:PRINT:PRINT"Ö YAHTZEE SCORING" 1160 PRINT:PRINT"ÜPoints are obtained for geting certain" 1170 PRINT"áÜamounts and patterns on the dice" 1180 PRINT"Üeg Runs,Sets and Pairs" 1190 PRINT:PRINT:PRINT"ÉPress any key to play" 1200 LET B$=GET$:IF B$="" THEN 1200 1210 GOTO 230 1220 DEFPROCscores 1230 CLS 1240 PRINTCHR$(141);" ÑSCORING" 1250 PRINTCHR$(141);" ÜSCORING" 1260 PRINTCHR$(141);" Ü Å=======" 1270 PRINTCHR$(141);" Ö=======" 1280 PRINT:PRINT 1290 PRINT"ÅAmounts on dice Score" 1300 PRINT:PRINT"ÑLOW RUN 70" 1310 PRINT"ÑHIGH RUN 80" 1320 PRINT"ÑFULL HOUSE 75" 1330 PRINT"ÑFOUR OF A KIND 80" 1340 PRINT"ÑTHREE OF A KIND 70" 1350 PRINT"ÑTWO PAIRS 50" 1360 PRINT"ÑONE PAIR 30" 1370 PRINT"ÑYAHTZEE 100" 1380 PRINT:PRINT" please enter your score " 1390 INPUT SC 1400 U=U+SC 1410 ENDPROC 1420 PRINT"SCORES" 1430 PRINT"AFTER 5 GOES YOU HAVE A SCORE OF ";U 1440 PROCsound 1450 PRINT"PLAY AGAIN(Y/N)" 1460 INPUT Y$ 1470 IF Y$="Y" THEN 1490 1480 GOTO 1510 1490 RESTORE 1500 RUN 1510 CLS 1520 PRINT"GOODBYE" 1530 END 1540 DEFPROCsound 1550 SOUND 1,-15,97,10 1560 SOUND 1,-15,105,10 1570 SOUND 1,-15,89,10 1580 SOUND 1,-15,41,10 1590 SOUND 1,-15,69,20 1600 ENDPROC 1610 DEFPROCcubes 1620 VDU 23,224,255,255,255,255,255,255,255,255 1630 VDU 23,225,255,255,231,195,195,231,255,255 1640 ENDPROC 1650 DEFPROCone 1660 PRINTCHR$(224);CHR$(224);CHR$(224) 1670 PRINTCHR$(224);CHR$(225);CHR$(224) 1680 PRINTCHR$(224);CHR$(224);CHR$(224) 1690 ENDPROC 1700 DEFPROCtwo 1710 PRINTCHR$(225);CHR$(224);CHR$(224) 1720 PRINTCHR$(224);CHR$(224);CHR$(224) 1730 PRINTCHR$(224);CHR$(224);CHR$(225) 1740 ENDPROC 1750 DEFPROCthree 1760 PRINTCHR$(225);CHR$(224);CHR$(224) 1770 PRINTCHR$(224);CHR$(225);CHR$(224) 1780 PRINTCHR$(224);CHR$(224);CHR$(225) 1790 ENDPROC 1800 DEFPROCfour 1810 PRINTCHR$(225);CHR$(224);CHR$(225) 1820 PRINTCHR$(224);CHR$(224);CHR$(224) 1830 PRINTCHR$(225);CHR$(224);CHR$(225) 1840 ENDPROC 1850 DEFPROCfive 1860 PRINTCHR$(225);CHR$(224);CHR$(225) 1870 PRINTCHR$(224);CHR$(225);CHR$(224) 1880 PRINTCHR$(225);CHR$(224);CHR$(225) 1890 ENDPROC 1900 DEFPROCsix 1910 PRINTCHR$(225);CHR$(224);CHR$(225) 1920 PRINTCHR$(225);CHR$(224);CHR$(225) 1930 PRINTCHR$(225);CHR$(224);CHR$(225) 1940 ENDPROC
I have one definite project that I want to complete this year, building a multi-boot bridge machine. This is more of an enabler than a full on retro project and will likely prove far from taxing, hopefully taking only a few hours.
Once achieved however it will allow me to seriously de-clutter my workspace and this in turn will hopefully allow me to get on with some other retro goodness without the continual hindrance of being surrounded in junk.
Due to the ubiquitous nature of MS-DOS and the various subsequent flavours of Windows most of the retro computers in my collection rely on connecting to Wintel machines to facilitate file transfers. Some of the software provided is very specific about which version of DOS/Windows it will play ball with. I therefore have a collection of machines running early versions of DOS through to Windows XP. My aim is to narrow this down to one machine.
Helpfully Microsoft still provide minimum specifications for Windows For Workgroups and XP.
Windows For Workgroups:-
- 80286 microprocessor or better for version 3.1
- 80386sx microprocessor or better for version 3.11
- 2048 kilobytes (K) total memory for version 3.1
- 3 megabytes (MB) total memory for version 3.1 (2 MB with no network installed)
- 3 megabytes (MB) total memory for version 3.11 (4 MB is recommended)
- 6.2 MB of hard drive space (14.5 MB recommended)
- Pentium 233-megahertz (MHz) processor or faster (300 MHz is recommended)
- At least 64 megabytes (MB) of RAM (128 MB is recommended)
- At least 1.5 gigabytes (GB) of available space on the hard disk
- CD-ROM or DVD-ROM drive
- Keyboard and a Microsoft Mouse or some other compatible pointing device
- Video adapter and monitor with Super VGA (800 x 600)or higher resolution
I delved in to my collection of motherboards and cases and decided to pair an Abit BH6 motherboard with a 300 MHz Pentium 2 ripped from a dead Dell Dimension. The BH6 has a good combination of ISA and PCI slots, USB, standard serial and parallel ports. It’s had an interesting few years, some of them spent hanging on the wall as decoration (regularly vacuumed in a non sympathetic manner) and the last 2 or 3 in a pile of other MBs in a damp, non heated shed. I was therefore a little sceptical as to whether it would still work.
I also found an Nvidia TNT 2 graphics card, two 128MB sticks of PC100 RAM, a 3.5″ FDD and a CD-ROM drive. I assembled all of the components into a suitable case and was somewhat surprised when greeted by a successful POST.
I decided in advance that the easiest way to boot into various OS’s would be to use Compact Flash cards. I have a number of them lying around in various sizes from 32MB up to 16GB and have had great success with them in the past.
I had therefore ordered an IDE to CF adapter with a back plate fitting so that the card could be swapped out easily. In retrospect a 5.25 Bay model would have been even more convenient so I may yet get one of those.
Once fitted and hooked up with a suitable cable I set about installing Windows for Workgroups, Windows 95 and 98 onto separate cards. The installations went pretty smoothly, I put DOS 6.22 and WFW on a 32 MB card, Windows 95 on a 1 GB card and 98SE on a 4 GB card. One other useful aspect of this method is that the cards can be easily removed and inserted into a card reader on another machine allowing easy transfer of files.
Having discovered some old floppy disks whilst rooting around for components for this machine it wasn’t long before it was called in to action. I installed a 5.25″ FDD into a spare bay and inserted the Windows 95 CF card. Once booted into Windows 95 I set about attempting to recover some old files as detailed here.
The build has therefore been successful, I’ll also do an XP installation and then I’ll be able to simply swap cards and boot into whichever OS I need. I shall also add an internal CF adapter with a 4 GB CF card onto which I will install all of the retro software that I need so that it’s always available to each OS.
The machine is reasonably quiet as the Pentium is passively cooled although the graphics card has a small fan, I may therefore root around for a fan-less model.
A sound card would be nice but not essential and I may see if I can hook up the two Voodoo 2 3D cards that I used to run in SLI mode.
Some of you will no doubt be familiar with last year’s story surrounding Jordan Mechner’s discovery and recovery of the Prince of Persia source code, you can read about it on Mechner’s blog here.
I suspect many of us have on occasion stumbled upon old floppy disks stored away in the back of cupboards or in our lofts. Over the years I have found several stashes of both the 3.5″ and 5.25″ variety. It certainly seems to be pot luck as to whether they are still viable and whether any recoverable data remains, although I have noticed that certain brands seem more resilient, 3M, Dysan, Verbatim for example.
In the process of searching for components for my bridge machine I stumbled across another such stash in my loft. I found my original Amiga game disks, titles such as Defender of the Crown, Monkey Island, Frontier and so on, some Amiga joysticks, a Philips CM 8833 monitor and most interestingly for me a box of 5.25″ disks.
On closer inspection of the box I found two disks that I had used back in 1985 for my computer studies class at school. What chance I wondered if any data could be recovered?
The computers that we used at school at the time were BBC Model B’s. I don’t currently have any BBC machines in my collection although I now feel a strong urge to acquire one along with the Microvitec Cub monitors that were ubiquitous at the time. I therefore had a look around to see if there was any software that might allow me to read the disks in a PC.
I quickly found the superb OmniDisk by Jason Watton and nervously inserted the first disk. After working my way through all the options it became clear there was nothing to be found on the disk. Of course there may not have been anything on the disk in the first place so undeterred I turned to the second disk, barely legible on the label, mine and Urbancamo’s form group – 5C4.
Immediately it became obvious there was some data there. I ran through the various options in OmniDisk (did I mention how superb it is) and eventually managed to extract an image from the disk and from this I was able to pull out the individual files.
Loading these into a text editor revealed that they were BBC BASIC programs, namely my game ‘Yahtzee!’ and Urbancamo’s ‘Airman’. Not exactly Prince of Persia but nevertheless pretty exciting on a personal level to recover such data from a disk that is the best part of 30 years old and has spent most of its life suffering the extreme temperatures of life in the loft.
The files are stored in tokenised binary format which results in a lot of garbage when viewing them in a standard text editor. I had a hunt around and found the BAS2TXT DOS program here which converts the files into readable text.
It worked very well although I still had to jump in and make a few manual corrections, but then that was ever the case when it came to my laughable attempts at coding. That’s why Urbancamo did the coding and I did the pretty things.
I’ve also recovered Urbancamo’s ‘Airman’ program and sent it to him, I think he may be incorporating it into his Retrochallenge which would be cool. Perhaps if he can finally finish that, he could move on to his PhD, snork.
I fired it up on my Mac Mini, copied my newly cleaned up code and pasted it straight into the emulator window, typed RUN and slap my thighs it worked!
There on the screen my hopelessly inept attempts at coding in full view for the first time in 28 years. Yahtzee!
There was even sound.
Subsequent attempts to access the original floppy disk have failed, it seems this really was last chance saloon stuff. Of course in the grand scheme of things it’s largely irrelevant, but on a personal level recovering those files has been a real ride and has brought back some fond memories.
If I can find a Beeb at a sensible price I think it may well be my next purchase.
Good friend Urbancamo has contacted me to let me know that the 2013 Retrochallenge Winter Warmup is now accepting entries from those who wish to participate. Running through January 2013 it’s a great excuse for dusting down your retro gear and finally completing that project you’ve been putting off.
Thinking cap on, time to decide what I shall do this time around…
Tough, rugged, angular, ugly… that’s enough about me, my Husky Hunter 2 has arrived. I’ve lusted after some military computing hardware ever since I first saw the GRiDCase controlled remote sentinels in Aliens SE. I’ve yet to come across an affordable GRiDCase but was pleased to catch this Husky instead.
Running the CP/M 2.2 compatible Demos this British made machine is physically designed to handle some serious abuse, an Epson PX-8 pimped by Lucius Fox if you like. Built by Husky Computers of Coventry and introduced in 1984 the unit runs an NSC800-4 Z80 compatible CPU and runs on four AA batteries.
Base RAM specification was 128K althoughup to 726k could be added. Ports are limited to one DB 25 RS 232. There’s a circular 4 pin power connector on the back.
After inserting four AA batteries I was initially unable to start my Hunter so I had a quick peek inside to check that the backup battery hadn’t leaked and fortunately it was fine, there was also a large pack of silica gel in there for moisture protection. On reassembly the unit powered up and a quick bit of research online revealed that the backup battery needs to draw some juice from the AAs before the Hunter will power on.
On boot you’re presented with a splash screen and press any key prompt, doing so takes you to the main screen and command prompt. There are eight pre-defined keys selected by pressing the CTL/FN button with numbers one to eight. One and two are the familiar CP/M commands DIR and STAT, three starts BASIC, four allows you change the communication protocols for the RS 232 port. To set the clock select five, six launches a terminal software, seven the Edit command and finally eight allows you to toggle to another set of options including Inp, Save, Type, Ren and Send.
My Hunter has arrived with a rather fetching ‘Secret’ sticker on the back warning that ‘This Winchester has been used for classified material and is to be treated I.A.W. current regulations in BR 4005‘ so there! Of course any information that may have been held in the RAM disk is long gone, indeed issuing the DIR command would initially crash the Husky every time until I formatted the drive. I’m aware that ‘Winchester’ became synonymous with any make of fixed disk but I’ve not seen it used to describe a RAM disk before.
There’s a very useful unofficial Husky Hunter 2 wiki here for which I am unable to identify the author but whoever you are I am very grateful for your efforts. From there I downloaded the HCOM file transfer utility and followed the excellent instructions provided for installing it on the Hunter. I ran the DOS client on my Windows XP box and the two machines were soon talking to each other via null modem.
I transferred over a copy of the CP/M version of Level 9′s Snowball which ran well, albeit with the need to horizontally scroll backwards and forwards to read the text.
I also took the opportunity to try the built in terminal software to connect to my BBS Nostromo which allows local connections via null modem and this worked without issue.
The built in BASIC interpreter is apparently quite powerful so I may have a dabble with that, meanwhile I’ve added some more images and links to resources below. Oh and I’ve just realised my model has a backlight, cool, but not very bright.