Sunday, 16 February 2025

ZX Spectrum and ChatGPT

I used ChatGPT (free version) to create a ZX Spectrum BASIC quiz game. I did not adjust the code afterwards at all.

I saw a few attempts at using ChatGPT in the ZX Spectrum Facebook group, where the consensus looked like "impressive, but we're not there yet". The LLM had failed to understand the Sinclair BASIC dialect, so although the logic of the simple programs could be sound they would not run on a Speccy.

But I figured, well, ChatGPT can be instructed to avoid the mistakes?

What I set out to do is a quiz game where the computer gives a name of an U.S. president, and the player has to know or guess when he was first elected.

I first made ChatGPT produce a list of presidents and the election year. As the result had some ambiguities and complexities, I asked to simplify the list so there are only first-time election years and no problem cases.

Then I asked it to format the list into ZX Spectrum DATA statements, starting from the line 1000, with 10 increments.

Only after seeing this list was formatted correctly, I asked ChatGPT to prepend the list with a Quiz-type BASIC game.

Although you can ask ChatGPT to use ZX Spectrum BASIC, this is not enough and the result is likely to be more generic BASIC dialect.

So, it is better to give a set of iron rules. Instead of trying to teach the peculiarities of Sinclair BASIC, I simplified the orders further, to avoid getting ChatGPT confused or produce something that would be difficult to debug. For example, dimensioned strings could be difficult to handle, as they work differently in the Spectrum.

bas2tap converts plain text listings into a Spectrum emulator TAP file. It's quite pedantic (i.e. accurate) so some of the rules below address this issue too. Bas2tap is an important tool as otherwise it would be too slow to test the listing, now I can just copypaste the ChatGPT output to a text file and run a command from terminal.

So, after outlining the game program, I told ChatGPT:


Remember that ZX Spectrum BASIC follows these rules:

-Use only one-letter length for variable names, and dimensioned variable names.

-Do not use IF-ENDIF reaching on multiple lines. Each IF-THEN part must only happen on one line.

-Do not use END. Use STOP instead.

-When assigning a (non-dimensioned) variable, you need to explicitly use LET

-When using GOTO or GOSUB, use GO TO and GO SUB instead.

-Do not use dimensioned strings. This could be achieved by looping and reading the DATA list for each  item. e.g. RESTORE can reset the reading of the DATA list.

-The first element of a dimensioned array is 1, not 0.


You could also forbid it using RANDOMIZE, as chatGPT may use it to reset the random seed, which is not really necessary.

That point about dimensioned strings and data lists is only relevant if the program has to go through a data list in the first place.

The game itself is quite silly, as I gave rather silly instructions to ChatGPT. You get to guess presidents, but if you fail it will tell you the year. The game ends if you guess one president right. Well, that's not a huge problem.

The way the program works is also a little quirky, but this too is to be blamed on the instructions I had given to ChatGPT. The program stores the year values to an array, but not the names. So it will have to scan the DATA statements again to get the name.

What I liked most about this exercise was how I could populate the data table so fast and easy, making a potentially boring task a wheeze. Granted, a list of presidents could be googl-eyed, or acquired from Wolfram Aplha, but there's still dullness in cleaning up and reformatting the results to DATA lines suitable for the limitations of this particular listing.

The listing: (Ok I did remove line 10 that had the unnecessary RANDOMIZE)


20 DIM Y(40)
30 PRINT "PRESIDENT QUIZ! GUESS THE YEAR A PRESIDENT WAS FIRST ELECTED."
40 LET S=1000
50 RESTORE S
60 FOR I=1 TO 40
70 READ A$, B
80 LET Y(I)=B
90 NEXT I
100 LET Q=INT(RND*40)+1
110 RESTORE S
120 FOR I=1 TO Q
130 READ A$, B
140 NEXT I
150 PRINT "WHAT YEAR WAS ";A$;" ELECTED?"
160 INPUT A
170 IF A=Y(Q) THEN PRINT "CORRECT! WELL DONE!": GO TO 200
180 PRINT "WRONG! THE CORRECT YEAR IS ";Y(Q)
190 PRINT "LET'S CONTINUE.": GO TO 100
200 PRINT "DO YOU WANT TO PLAY AGAIN? (Y/N)"
210 INPUT B$
220 IF B$="Y" OR B$="y" THEN GO TO 100
1000 DATA "George Washington", 1788
1010 DATA "John Adams", 1796
1020 DATA "Thomas Jefferson", 1800
1030 DATA "James Madison", 1808
1040 DATA "James Monroe", 1816
1050 DATA "John Quincy Adams", 1824
1060 DATA "Andrew Jackson", 1828
1070 DATA "Martin Van Buren", 1836
1080 DATA "William Henry Harrison", 1840
1090 DATA "James K. Polk", 1844
1100 DATA "Zachary Taylor", 1848
1110 DATA "Franklin Pierce", 1852
1120 DATA "James Buchanan", 1856
1130 DATA "Abraham Lincoln", 1860
1140 DATA "Ulysses S. Grant", 1868
1150 DATA "Rutherford B. Hayes", 1876
1160 DATA "James A. Garfield", 1880
1170 DATA "Grover Cleveland", 1884
1180 DATA "Benjamin Harrison", 1888
1190 DATA "William McKinley", 1896
1200 DATA "Theodore Roosevelt", 1904
1210 DATA "William Howard Taft", 1908
1220 DATA "Woodrow Wilson", 1912
1230 DATA "Warren G. Harding", 1920
1240 DATA "Calvin Coolidge", 1924
1250 DATA "Herbert Hoover", 1928
1260 DATA "Franklin D. Roosevelt", 1932
1270 DATA "Harry S. Truman", 1948
1280 DATA "Dwight D. Eisenhower", 1952
1290 DATA "John F. Kennedy", 1960
1300 DATA "Lyndon B. Johnson", 1964
1310 DATA "Richard Nixon", 1968
1320 DATA "Jimmy Carter", 1976
1330 DATA "Ronald Reagan", 1980
1340 DATA "George H. W. Bush", 1988
1350 DATA "Bill Clinton", 1992
1360 DATA "George W. Bush", 2000
1370 DATA "Barack Obama", 2008
1380 DATA "Donald Trump", 2016
1390 DATA "Joe Biden", 2020

Monday, 20 January 2025

Kempston-USB adapter for The Spectrum

What's wrong, or right, in this picture?

After using it for a while, Retro Games' The Spectrum is a rather nice Speccy-tribute. But it's not an authentic hardware replica, and old 9-pin joysticks and peripherals won't work with it.

But what if... I was to purchase a vintage joystick adapter and disguise it as a Speccy peripheral? Delightfully devilish!

I already have an Arduino-based adapter for attaching classic 9-pin joysticks to USB, and it works with The Spectrum. An Arduino Micro or Leonardo can pretend to be a HID device, essentially becoming a gamepad without buttons. On Retro Games' The C64, I had problems possibly because it's a type of controller not "whitelisted" in the firmware.

The USB ports at the back of The Spectrum are where the edge connector is supposed to be. This got me thinking I could build an adapter to look more in line with The Spectrum's appearance.

I happened to have some Speccy joystick adapters, and one Timex Joystick-Sound Unit has had its guts removed already before. Not sure why, but at least I don't have to feel too bad about breaking one now.

Apologies to all Portuguese Spectrum fans to whom the sound unit is a matter of national pride. (Timex manufactured these units in Portugal, among other things).

All the parts

I started by fitting the Arduino Micro inside, using 3x1 protoboard as a replacement for the original circuit board.

There's more room inside than in my compact adapter, but because of how the board fits inside, it's not all in use. Also, I wanted the Arduino to sit on a socket, which eats up quite a lot of space.

But it all fits inside, I then soldered ready-tinned wires to connect everything. Maybe the Arduino would have fit better horizontally, but what's done is done.

The new problem was finding a short USB-cable or some kind of adapter, that would work as a connector and keep in place.

I did look for L-shaped adapters and cables, but there didn't seem to be a ready-made configuration for a USB-A in L-shape that would configure into a micro-USB.

So I just bluntly took the least useful Micro-USB cable I could find, cut it and soldered it into a really short USB-A-to-Micro cable. I found the space was not quite enough for the Micro end, so I whittled the rubber out to bare minimum to make it fit.

The Micro-end has been whittled bare.

I wanted to make the adapter so it could be meaningfully pulled apart, if I need the Arduino again in some distant future.

At this point I could test it already works and fits into its place. I uploaded the same Arduino sketch as with my earlier adapter, and soldered the cables same way. That's it.

The remaining problem was how to make the USB-A end stick to the box firmly enough and still be able to dismantle the whole thing. Of course I could just glue gun it all to oblivion, but it might be tricky to get apart.

The USB sticks into place

I fit a piece of MDF snugly and put two screws through. This looks like enough to keep the USB connector in place and it won't fall apart when I gently remove the adapter from The Spectrum.

Another dummy connector, or something in similar shape, could be added just to keep the unit more firmly in position. I'll do it if I'm in the mood for fine-tuning this box.

I already know the Arduino joystick adapter feels lagless enough, and in practice this unit doesn't add that much to the Speccy experience. The old adapter I built is more practical. But this was a fun project idea and at least The Spectrum has its own adapter.

One future idea is to implement the "sound unit" function promised on the tin. This is not too far-fetched, as I could pull the audio out of the HDMI->VGA adapter's audio splitter and add a tiny speaker with an amplifier circuit. This would add some value to the box, replicating all the glorious 5 octaves from a tinny speaker as it's supposed to be.

Monday, 13 January 2025

More spirit burning

Another wintry locale

Again, a mini-camping trip in -7°C weather, using the Trangia 27 and a spirit burner.

This time lighting the spirit alcohol wasn't too stressful, because problems were already to be expected. It wasn't very fast with the plasma igniter, but it did fire up without using additional material. Warming the burner in hand might have helped, although the spirit itself was cold.

To the menu. First, two eggs were fried. I wanted to do something really basic, yet avoiding the warming up of a ready-made meal.

They turned out fine, with grease they wouldn't stick to the teflon so it wasn't at all too difficult. At that point the burner was in full effect, so after turning the quartered pieces around I already had to start taking them off the pan.

Eggses

The burner was shut down, but this pause was so short no fuel was really saved. As expected, a warm burner and spirit was easy to re-ignite.

Next up were Marq's tortilla-pizzas with fried champignons, pasta sauce and mozzarella. Here the flame was so strong it could burn the tortilla fast, without necessarily heating everything inside. Making the second one, the flame started showing signs of dying out.

Re-filling meant both the burner and the spirit were again cold, so there was the tedious process of lighting it. The plasma igniter worked, but it wasn't especially fast, I'd say slower than the first time.

Next item in the menu

Using the simmer lid the flame died so much it wasn't really useful for doing the tortilla-pizzas, even if the lid was kept in open position. This is likely because by default the lid already prevents the flames coming from the rim. The middle flame is then really weak in comparison.

It would have been good to dilute the spirit a little with water, it would produce less heat, but also less soot.

The rest of the spirit (less than half of the 150ml) was used for heating two more tortilla-pizzas and 0.5l of mulled wine. The left-over spirit was made again to work on a small amount of clean-up water. It was just about to start boiling properly when the flame finally died.

A cover makes boiling faster...

Compared to last time, there was an overall sense of messiness, not surprising as the cooking was now more complex. 

A plastic bag for the Trangia is a must if there's no intention to clean the pans and pots on site. Even then it's not a good idea to strap the Trangia, as the strap will get dirty too.

The teflon ended up having some burnt residual stuck in a way that was difficult to remove. It remains to be seen if the non-sticking property still works as well.

I suspect it may be easier to ruin the teflon with the spirit than with gas, although I did try to keep the pan filled or greased all the time.

The multi-disc got some damage, likely because it was used as a cover while boiling, and the flame from the burner behaves a little erratically. The instructions do say not to use the multi-disc as a cover in this manner.

...but apparently can result in problems.

Although the cooking was successful and the food was tasty, I ended up having a less positive impression of the spirit burner than from last time.

150ml was easily used up, re-igniting was not too fun, control was a little problematic and there was soot to clean up.

Add to this some general faffing about with placing items, finding surfaces, removing and replacing gloves, and dealing with the backpack... it's clear the experience could have been smoother. 

A lot can be attributed to poor planning and the tricky weather conditions, and not to the spirit burner as such. Winter might not be the best time to practice its use.

The biggest winner were the newly acquired spiked boots, I had no fear of slipping and they kept my feet warm through the whole session.

Monday, 6 January 2025

Trangia in the freezing outdoors

The Trangia 27 was tried in proper outdoor conditions, in about -7°C weather. Some earlier assumptions already had to be revised.

But before that, some words about gear expansion. I got a Trangia 0.3L fuel bottle, Trangia multi-disc and a backpack.

I had the misfortune to find out the multi-disc doesn't properly fit into its "carry" position inside the Trangia 27 stack. This resulted in an annoying 5-7mm gap between the pan and the cover when stacked.

Trangia multi-disc and the 0.3L fuel bottle

Some angry moments were spent wondering how on Earth could Trangia have mistaken two circumferences by the order of several millimeters?

Then, in the clear light of the morning I understood the flaw is not that radical. The folded edge of the Trangia upper windshield can be bent inwards. Then it will fit in the disc groove.

I simply took the pliers and put some protection between the jaws. I did the adjustment with far too much haste, but the edge wasn't entirely ruined. Possibly a round wooden pin rolled hard against the edge could have been better.

I am many things but maybe not a metal artisan

Even after getting the disc to fit, there's a 1-2mm gap between the pan and the windshield in the stack, but I can perhaps live with it.

The Trangia fuel bottle ("red") is quite handy and the safety cap looks very sturdy. 

I have to wonder though about the build quality here too, the cap plastic shape isn't very precise and what looks like a metal ring around the container is painted into metal color? And even dispensing said color to my hand? But in functionality, all appears to be well. 

A backpack was dedicated to outdoor gear (Black Diamond BBEE 11 if you must know). Cheap, it has numerous features for attaching equipment, and a nice hook inside for hanging the bottle vertically, inside near the top of the bag. The Trangia 27 stack fits snugly at the bottom of the bag. I thought the small size might encourage more minimal thinking, hopefully this decision doesn't backfire.

Helsinki January breeze

At the site

I had read the spirit might be tricky to ignite in the cold, but I had assumed this would really only happen in -20°C conditions.

But the plasma igniter wouldn't do on its own and a piezo lighter wouldn't ignite even warmed-up spirit. A few tries with burning paper handkerchief material got it going, but even this happened rather randomly, possibly some quantum cascade when it was not observed.

No wonder pre-warmers exist. After the spirit and the burner had warmed up, it could be safely shut out and re-ignited, which is a good thing. At that point it's really not more difficult than operating gas. The simmer lid was not adjusted, I simply used it to snuff out the flame when needed.

A little less than 100ml of spirit was burned. A few drops of water were added to prevent soot.

First, a 0.5l pre-warmed water was made to boil for a Blå Band instant soup, another Swedish institution. (10 minutes) Then, some cheese sticks on the pan and then 0.5l of mulled wine.

Just as a test, some more water was put on, but there wasn't enough spirit to get it to boil. Especially not without a cover.

So, what felt like an overkill of spirit to carry was actually a reasonable amount for the tasks. This means about 10 comparable sessions with 1L of spirit.

The flame is on

At least in the cold, the burner flame isn't as stable as my meager previous experience had suggested. I would say it did its job reliably, but it's not exactly on/off. After a rough and cold start it will improve in time, and then it will die out as the fuel runs out.

Compared to gas, I had some negative expectations especially after the difficulties with ignition. All went well, considering the lack of experience. But then again the spirit burner is the original Trangia product, whereas the gas burner is a later addition.

The spirit is almost uncomfortably silent compared to gas. I don't mind the gas noise, and it's often a good tell-tale sign of how things are going. There's nothing in the spirit burner that "says" about the condition of the fire.

Campers who make longer treks have compared the weight of spirit fuel unfavorably to gas. But what about this kind of quick foray? If 100ml of spirit weighs about 100g, together with the Trangia bottle (93g) it's getting near the 200g territory, comparable to the weight of a 230g gas bottle. Ok, alcohol is less dense than water, so I have to measure this empirically.

If you're confident with taking ~70ml and carrying it inside the burner, sans bottle, then obviously it will be a very, very light load.

For this kind of 1-2 person tasting trip, the small Trangia set proved easy to use. I'm looking forward to using it in warmer weathers...!

Not so sooty as last time

Wednesday, 1 January 2025

2024

Time for the yearly recap. As usual, I don't dwell on work and home life. I'll still note that 2024 is a weird year to retrace, as my time use has become disrupted. I watched less films and TV than probably ever. I didn't play that many games. I didn't read many books.

There was some coding, tinkering with stuff and visiting demoparties, though.

The retro year was bookended by two ZX Spectrums. I gave intense attention to the Spectrum Next at the beginning of the year, even writing a small article for Skrolli about it. This enthusiasm ceased almost as rapidly as it was built up. It's an interesting hobby computer, but somehow I can't get my head around working with such a niche-of-a-niche platform. Now that a QL core has arrived, I may be tempted to dig it out again.

A family of Sinclairs and Spectrum-likes

The Spectrum from Retro Games also appeared late in the year, got it up and running with the nearly mandatory HDMI/VGA, memory stick and joystick tests. I've been fiddling with some extra material during the holidays, and the fruits will be posted in the blog eventually...


Demos and Games

In 2024 I visited the most demoparties ever, which isn't all that much though. But, most of my retro and demoscene motivation coalesced around the Vammala Party, Assembly, Alt Party and especially the Zoo 2024 event. I partook in my first ever Assembly contribution with the LVL001 entry Astral Plane Mechanism for the Tic-80 fantasy console platform.

Telefunken VR520, in glorious PETSCII

At best, the party bubble persists even after the event, with recurring fantasies of giving up one's day work and concentrating on 8-bit platforms for the rest of my life. As the fog subsides, reality returns and I find it less meaningful.

Zoo did have a longer afterglow than usual, further helped by the mythical Fishbomb demo from Extend, which failed to appear at Zoo. (It was presented in the Transmission64 online event.)

Zooparty: Elite turned 40

Alt Party likely served as a gentle reminder of the "I ought to have had" mindset that always follows when not contributing anything. This may have helped me create a whole game for the Zoo Party, The Last Z-8. However, made under a month it was still a little rough around the edges and I have been adjusting it still.

I also finally organized my game imperium into a bare-bones representation at drterrorz.itch.io, also featuring the Multipaint release. Time will tell if this is somehow useful, or if enshittification will eventually eat itch.io too.

Sound

The quest for the perfect music/sound creation environment continues, the old Akai EIE sound card serving as a catalyst for change.

I'm now thinking that computer-gear hybrid setups are too clunky, whereas either doing everything on a computer or without a computer, is more viable or suitable for my approach. The former means using Goattracker to create SID music for games, the latter means messing around with mini-synths and a MIDI-synced multitrack recorder. More about this later, maybe.

A Roland Boutique JX-08

God forbid actually producing, or learning more music.


Films, TV, Games

Ok, I did really watch TV and played some games. But No Man's Sky was the only substantial new game I got my hands on to. But I just couldn't become hooked to what is essentially an endless customization, crafting and tinkering trip. Otherwise games were limited to the occasional 5-minute plunge into vintage ZX Spectrum, Amiga and C64 games.

I restarted my Lichess account for playing chess, and concentrated on playing only the 5+3 games and puzzles, with varying success. I've now again lapsed, it remains to be seen if I can find the time and better sleeping patterns to continue it meaningfully.

No Man's Sky

Three Body Problem at Netflix didn't entirely mess the books' premise, but it was still more of a slideshow collection of all the cool ideas and iconic moments. Then again the books were mostly one cool idea after another.

Umbrella Academy is one of those series that started with a promise, but kept dwindling. I'm glad it is now finished.

I watched some original Star Trek from Netflix, concentrating on the episodes I already knew to be good or at least iconic. Which mostly means seasons 1-2. The Doomsday Machine, Amok Time, Journey to Babel, The Ultimate Computer, The City on the Edge of Forever, Balance of Terror, The Squire of Gothos, Naked Time...

Acolyte was a modestly interesting Star Wars series for a change, so of course the army of tiny JD Vances had to review bomb it out of existence. I haven't still finished Star Wars: Skeleton Crew. It looks like it's more aimed at kids, which is ok – nearly all Star Wars is – but altogether it seems the series didn't really need to exist in the Star Wars universe.


Physical space

The 2024 was marked with more activities oriented in the physical reality, which I also blogged about. 

The electric kickbike customizing pretty much died for 2024, although I did ride the rentals just as before.

I did get a few more woodworking/DIY tools. One reason for this is the near-constant modification and attempt to squeeze something out of fairly small spaces, but also making boxes for electronics and joysticks, which require more precise tools.

The Z-saw "best" 90-degree sawing guide

A pro might make do with simpler tools and learn to be accurate, but I can't resist the idea of having gimmicks that make tasks easier. Seeing as nearly every task has a corresponding life-saving tool, such a tendency can easily fill your non-existent garage.

Gadgets may be doomed to gather dust at the back of a shelf. Hopefully blogging about them reminds me of their existence.

I've also learned not to buy the cheapest alternative, which can deal a blow to the old wallet. There are the cheap "Temu" knock-offs, which are to be avoided. I'm also a little suspicious of what one finds at Clas Ohlson or Motonet, even though they can be reasonable. 

Then there's always the Woodpeckers® ultimate solution, imported from US will cost an arm and a leg.

Trangia cooking with spirit alcohol

Last but not least, I had some experiences with Trangia camp cookers, first through "passive smoking", eventually receiving one version myself.

Again, a hobby that involves material configurations and acquisition of extras, accessories and superfluous crap, it does have the positive side of doing something outside. That is, if I get that far.

Saturday, 28 December 2024

Trangia 27-3 UL cooker

Of course the strap had to be misplaced for the photograph.

I received this small storm / camp cooker from Marq, who got the Trangia virus already earlier.

So I know the deal with the pans and the pots from those urban excursions. But this burner uses spirit alcohol, so that's at least a new thing.

The Marinol brand of spirit has been recommended so I bought 1 liter for 7 Euros. I've read the Covid-19 and Ukraine war has increased prices for spirit alcohol, so who knows it might have been cheaper in the past.

The equipment inside the box (and a few that don't belong)

There's a couple of things in the box not to be thrown away. The burner is meant to be kept in the yellow plastic bag, as it can be sooty. The teflon pan has a plastic sheet for protection, and this also needs to be kept in place. (Not very visible in the above picture, I don't mean the bag around the pan.)

The kit weighs about 740 grams, including plastic bags.

For my water boiling test I used 50ml of spirit. I poured it into a kitchen measure, and then into the burner.

The burner in place, and the simmer lid component.

The fire was made with electric plasma lighter, a silly impulse purchase that barely fits inside the Trangia. 50 grams.

The flame started out quite blue and low, which looked nice and cozy. But in time the flame became higher and turned more yellow.

I knew 50ml to be too much, but I naively expected I could wait it to die out. But as my first test was on a balcony, I couldn't spend the time.

The balcony setup.

The vapor, smoke and scent can easily rise to the floor above. Also, after the pot no longer covers the flame, the flame rises so far above the cooker, it begins to illuminate the surroundings in an undesirable way. An outside observer might suspect a house fire, without even seeing the actual flame.

For these reasons I snuffed out the flame with the closed "simmer lid". I probably won't ever use the burner in the balcony again.

The first flame. The simmer lid component is not in place.

Also, even with all the care it is difficult to avoid the smell of the spirit alcohol. I'm a little suspicious about the indoor use case suggested in the Trangia manual...

Even for such a small test, it was easy to forget equipment. Luckily it was all one door away. A checklist and well ordered Trangia "package" will be a must.

Some instant noodles

The ten minutes of burning had barely consumed half of the alcohol. So the 1 liter bottle could be good for 40 comparable rounds.

But then again, this ten minutes only boiled slightly more than 0.3L of water, in a weather of about 3 degrees Celsius.

I don't know the water initial temperature, but it was cold tap water. Just for the sake of doing something productive, I added instant noodles to the boiling water.

Soot from 10 minutes of cooking

The pot had become surprisingly sooty, but apparently this is to be expected even with the "clean" Marinol spirit. The denaturing components are mostly to blame.

A common tip says to add a little water to the mix, which is something to try the next time. This needs to be done right, as too much water will reduce the flame effectiveness to the point it can't even boil water.

PataPata steel wool

Using dishwasher and a brush did little or nothing. PataPata soaped steel wool got rid of the soot, but it's also nearly like sanding the dirt away. I was wary of doing anything similar to the inside of the pot, although it doesn't look like these basic pots have any protective surface.

It's far too early to compare this with the gas burner experiences, but I'll try anyway. 

Having to clean the pots is a bit of a downer. Gas is faster. The spirit sure is cheap and needs less carrying than the gas container(s). In both cases you don't really see the flame while cooking, and it may be the spirit flame is more predictable, if only for being slower. But then again, it's really easy to adjust the gas.

Monday, 2 December 2024

Retro Games Ltd: The Spectrum

I guess it was unavoidable. To add to the pile of Spectrums and emulators, I bought Retro Games' "The Spectrum". Is it any good?

Physical appearance and connectors

The case appears as good as can be realistically expected. Perhaps the graininess of the back part is grainier than in the original, and obviously it says RETRO and not Sinclair. 

I'm not going to open it just yet, I've seen pictures of the insides though. The weight is credible, there are metal weights inside. If you need to adjust the weight up- or downwards, it shouldn't be hard to do.

The rear panel has only modern connectors: there's a kind of emulator inside, I suppose a bare-bones Linux, which then provides HDTV-out and USB connectivity.

The connectors and buttons at the back

Retro Games have entered the USB-C age, which is good. I've powered The Spectrum happily with a 20000mAh power bank, using the 5V/3A output. A Raspberry Pi -type PSU should be optimal. I've not dared to use a laptop charger, though I'm not sure why it would be a problem.

The power cable is at the "wrong" side of the computer but it's sensible to have it near the HDMI, so as not to have wires dangling from both sides.

There's a power button so the cable doesn't need to be yanked away every time. There's one USB port near the HDMI and power cable, a good place for a semi-permanent memory stick holding your games and original system ROMs.

Then there are three additional USBs, perhaps for two controllers and one for ... keyboard, if you really want to.

And a home button at the right side, surely a familiar idea to users of Multiface cartridges of old. From here you can access the game selection carousel and other system menus.

The triad of USBs is nicely placed where the original Spectrum had the edge connector, contrast this with TheC64 which had nothing at the cartridge port location. I can imagine a 9-pin joystick adapter taking its rightful place here.

Keyboard

The most important thing for me is the keyboard. Because if it doesn't work, then I'm nearly better off using an emulator on the PC. So, does it pass the muster?

First I'll say it's better than the Elite Recreated keyboard from around 2015, which I tried hard to like in my review back then. For the record I have to admit it had the Sinclair logo, and the case was perhaps in some ways more accurate.

They might not be exactly identical to the original Spectrum keys

I couldn't shake the feeling The Spectrum keyboard is a little mushy too. But this was at least in part because I had no sound on while in BASIC. Perhaps an added psychological sense of "snappiness" comes from that sound.

Turning sound on did make it more comforting, although it would be nice if the sound came from the insides of the case itself. Maybe a DIY hack will surface.

Playing games, the key presses are usually silent so the above point shouldn't matter at all. How does the keyboard fare as an authentic Spectrum controller?

The built-in games are chosen from a "carousel"

I'll say I was fine with it. Using the holy QAOP combination for games worked well, I didn't experience missed key presses or physical obstructions. Epic games like Lords of Midnight and Elite are more enjoyable this way than with a PC keyboard. I can even use the original keyboard overlays.

Perhaps surprisingly, I couldn't get into adventure games with this keyboard. I tried a few, but soon turned away in frustration. It's not the keyboard as such but the wonky and slow input that Speccy adventure games often had on offer, and I'm not a big fan of the genre anyway.

Typing BASIC works well, and this is one major difference to PC emulators. There you have to feel your way around a non-standard keyboard layout to produce the BASIC keywords. No such problems here, but admittedly it takes some guts to use that old rubber for programming.

Then some nitpicks.

It's interesting to note the printing on and around the keys are positioned just a little bit off. Perhaps it could be even an IP matter, made just different enough so it's not a full facsimile of someone else's work?

But that's not all...

Retro Games The Spectrum: ~9.6mm

The keys are just a tiny bit smaller than in the original Spectrum. This was my first intuition, and when I took out the vernier caliper, I could see the original ZX Spectrum has almost exactly 10.0mm size keys, and The Spectrum has them in the 9.6-9.7mm territory.

I'm wondering if they shrunk unexpectedly in the manufacturing process.

To me this raises the question if the original rubber mat would fit the new machine. It did seem to me the holes in the metal plate are correctly sized.

Sinclair ZX Spectrum: 10.0mm

Joystick

As my Arduino joystick 9-pin adapter didn't work with TheC64, I was a little sceptical (spectical?) if it would work on The Spectrum. But then news started coming in that nearly all USB game controllers work, and I was ready to be optimistic.

I must say it passed with flying colors. I can attach a TAC-2 controller and play games without having to resort to a modern gamepad.

This one here.

Two controllers can be set, and there are ample options for configuring them.

I didn't even try the Retro Games Competition Pro-style USB joystick that came with TheC64, I assume it works and is just as bad as before.

I have no intention to test lag scientifically. My gut feel is that there is likely not much lag, but if you really go looking for it you might find it.

Spectrum games rarely have a very fast screen update anyway, so any lag would probably be lost within the general chunkiness. Using my Joystick adapter and 50hz HDMI display, I didn't feel anything was off in the fast paced Atic Atac.

Video

50hz and 60hz screen refresh rates are provided, and you have to make that choice when you first boot the computer.

I think it's crucial The Spectrum is connected to a 50hz-capable display, for authentic speed. Fortunately I have such a display, so no problem there. Normal TV-type displays can likely do this better than some computer monitors.

The screen is scaled in an integer-based way, so I didn't see any interference patterns or moire-type effects, not on a 2560 x 1440 resolution display or 1920 x 1200 display. Why I even bother to mention this is that I've found some non-commercial emulators difficult to set up in this respect.

The clear menus you'd expect from Retro Games

For authenticity, the amount of BORDER displayed can be adjusted, and this is also a game-specific setting.

For my tastes, the non-bright color levels and the BRIGHT levels are a little too close to each other. My experience from the original is that the boot-up white screen is grayish, and the bright white really stands out.

The BASIC program below is a very rudimentary test that tells me The Spectrum generates a rock solid frame rate.

10 PAUSE 1
20 BORDER 0
30 PAUSE 1
40 BORDER 7
50 GO TO 10

Seeing "tear" or other hiccups would indicate a less than ideal experience. The border should flash consistently, as it does on The Spectrum.

A 50hz smooth frame rate in a Spectrum game is quite rare, so it's not surprising if games are not silky smooth. But it may be indicative of more subtle timing issues in the hardware? To be really sure, I would have to compare outputs to each other side by side.

After seeing a few demos that showcase horizontal scrolling, it was easier to see the frame rate is indeed smooth. It may be that a 50hz in a modern display is more mechanical than a CRT with some afterglow.

To get audio, I needed to use my HDMI-to-VGA with 3.5mm audio splitter, and it worked just as well here as with TheC64.


System

Games can be loaded using a USB stick. It should be FAT32 formatted, and you need to have games in folders that have a maximum of 256 files each.

I'd recommend NOT to have 1000s of games at hand, but to concentrate on a smaller number of games you know you can return to, and maybe a few unfamiliar ones you intend to have a crack at.

A suitably themed memory stick...

I don't have much to say about the 48 game collection that came with the computer, haven't yet tried them all really. To me it's a combination of hits and misses, some obvious inclusions (Manic Miner) and some obvious omissions (the Ultimate catalog).

From older games, I prefer simple and short ones such as Saboteur!, Bruce Lee, Splat, or Viking Raiders. But just sometimes, more epic is more fun, as with Lords of Midnight or Elite.

Compatibility issues may arise because the Retro Games ROM for Spectrum is not a Sinclair/Amstrad ROM. Fortunately this can be changed, if you think you have a permission to use the ROM. These need to be added to a specific folder path on the USB stick, THESPECTRUM/roms/ (See the large manual p. 48)

Using the default Retro Games Ltd system ROM, I could see that Manic Pietro, which uses a timing-based graphics engine to circumvent the normal attribute limits, showed some flickering. Switching over to Sinclair ROMs, this flickering ceased.

Here I have to say a speed boost would have been welcome for games such as Lords of Midnight, or Viking Raiders. But The Spectrum is set at the standard 3.5Mhz. There is a rewind option for cheating.

There are no timing adjustments, for example the "Pentagon" timings are not possible, and 128K appears to be the memory limit.

There are some reports of snapshots not working. I did find a snapshot of Bruce Lee, which works on Fuse emulator, but crashes reliably on The Spectrum. This with Sinclair ROM or not. These situations can be fixed by searching for an alternative snapshot or TAP file.

Final words

For someone who already knows their way around Spectrums, this may be just another collectible to fill the shelves. But I think it succeeds better in reaching its goal than TheC64 did, which wasn't bad either.

Some questions were left open, such as if it's possible to use an older Spectrum rubber mat, or modify an existing keyboard membrane to work on The Spectrum. Maybe I'll look into this eventually.