My recent site additions are all for the first computer that our family owned, the ZX Spectrum. Way back in 1983!
I’ve created a new section – ZX Spectrum – BASIC Rips – which is about 70% complete for what I plan for it. Several sections are ready and usable, but there are a few that I need to spend a bit more time with.
The intention of this new section is to show how you can extract the original Spectrum BASIC listing from a snapshot or tape file for a game that you know (or suspect) is written in the original Spectrum’s language. There are sections covering what steps that you need to look out for, especially tricks from way back when and (eventually) how to recompile that game for your Spectrum.
Or speed it up by rewriting it using Boriel’s BASIC. Alternatively, why not port it to another machine from the past?
What’s Done – What’s Not?
So far, I’ve done the following:
a) Brief introduction to tools used and picking an example game (Lords of Sagan) b) Opening and extracting the BASIC from the original file c) What to look out for in the extracted text file i) Code savings ii) Extended Mode Graphics and how they’re represented iii) Embedded Colours and how they’re represented
a) Compiling back to a Spectrum .TAP file using ZMakeBAS b) Porting code to Boriel BASIC – so your games run much faster c) Porting to other machines – although this is a long way off
What can I look at?
I’ve uploaded a lot of examples, in many gaming genres (and some utilities) for you to look through. They can be found on the ZX Spectrum – BASIC Listings page.
Each download comes with the BASIC source code in a text file, along with the original target file that was used.
These will be tweaked when time permits to include any notices that I think you need to be aware of, such as UDGs, Z80 machine code extras and any sneaky bits that you need to be aware of.
30 years ago, I was quite a prolific creator of saved game editors for the Atari ST (*).
Last weekend I attended the SillyVenture in Gdansk, Poland and I had submitted my disk into the Wild! Compo as it wasn’t a game, nor a demo, nor something that fitted into teeny, tiny memory. This is GFA BASIC after all
However, during the event, I showed Grey/MSB my new Atari tattoo that I’d got done for the Atari 50th year as well as something fun to show off at the event. Once it was on Instagram, it went onto Twitter and two scene legends (Leonard/Oxygene and Gunstick/ULM) suggested that I also enter the tattoo into the same Wild! competition.
Somehow in a “wires crossed” scenario, my disk entry disappeared and my tattoo became the only entry I had. However, this got me a 2nd place and one of those SillyVenture statuettes. So a happy result in the end.
After getting back to the UK on the 17th (Tuesday), I decided to double-check all my spelling in my .RSC files and I released the 30 Years Later disk. Then I had to re-release it the day after as someone on Atari Forum had spotted my DESKTOP.INF file wasn’t allowing .TXT files to be viewed. D’oh!
The disk contains 12 of my older cheats brought up to date using GEM .RSC files. All development was done using GBE v3.72 and Interface v2.33 whilst running under EasyAraMint. EasyAraMint is very nice to use, but I did come a cropper once when I realised that designing a .RSC file whilst using a large display means that sometimes it doesn’t fit on a standard medium resolution desktop. Ooops!
There are two brand new cheats for Air Bucks & Hillsfar. There’s also an update of my GFA File Linker (v2.5) which now contains example retrieval code taken from my Synthetic Delights demo. Lonny has recently added Auto v5.01 and SpeedPacker 3 depack routines to his GBE’s ~UNPACK command – so get the latest beta from his Google drive.
I have to admit that trying to program GEM .RSC files after 30 years of using VBA was a pain at times because I’m so used to the extras that come with Windows GUI tools. No combo-boxes, no listboxes and general “whatever you’re thinking you can add, you can’t”.
Samurai^Inter’s son, who was at the event with his Dad, wanted to see just how “bad” things were for .RSC design as he was learning/using Kotlin and moaning about its limits. He was shocked at how few options a basic GEM application can have for a tree
Note: There’s no hard feelings felt towards those handling the compo entries as sh!t does often happen
I will be taking requests in the near future, but I’ve still got about 6 saved game editors that only exist in their original form (non-GEM .RSC interface) and I want to update those first before taking on any others.
(*) I also ported a few to the Amiga, but GFA BASIC on there was dire by comparison and I’ve since lost the original disk.
It’s been a few years since I attended an Atari-themed demo party. So with it being the 50th year of Atari’s existence, I’ve booked my flights and hotel so that I can attend Silly Venture 2022 SE in Gdansk, Poland in August.
Thanks to Ryanair’s scheduling of the available flights from Manchester to Gdansk, this has now become a holiday and a demo party rolled into one trip. I need to be at Manchester airport at the crack of dawn, which I’m used to as I prefer to have the flight and then (at least) half-a-day to explore the area once I’ve checked in.
I’ve also got a full day after the event to do some sight-seeing, photo-walks and such like. My last visit to Poland was a few years ago when I saw Depeche Mode live in Warsaw.
To make it a tad more enjoyable, I’ve pushed the boat out and got a *very* nice room to be in as well. I normally just slum it in a Premier Inn (or much worse) when I go away to events or on my holidays. I hope that the photos on the hotel’s website are what I’m really getting 🙂
The plan is, hopefully, that I’ll get a disk released with some of my updated cheat routines. I’ve, with help from the GFA BASIC FB group (esp. Lonny) rebuilt them proper GEM .RSC files. No more logos or SNDH music, but “proper” programming!
The downside to this is that I’m having to re-learn how GFA BASIC handles .RSC files. It’s almost 30 years since I designed an .RSC interface to one of my programs. Also I’m using EasyAraMint as well, as that’s the only way you can use the enhanced GFA BASIC (aka GBE). However, the games need to be run under STEEM when I’m testing out my editors.
I’m certainly looking forward to this demo party / tourist trip 🙂
When I say ‘hacking’, it’s used purely as an overall description of what I’ve been doing to help out with DemoZoo’s Atari ST side of things.
Some of the releases were only available on certain compact disk (note disk, not disc as in CD-ROMs) groups’ releases. These were one or two floppy disks and contained as much as possible due to the usage of file packers for both executable and data files.
Demozoo prefers to have each release as part of a single download per demo/intro. With links to YouTube videos if they’re available.
This is where I come in and (try to) help. Not every attempt is a successful one, mainly due to me being able to remember everything that I can about similar tricks from 25-30 years ago.
On the Syndicate Delicious Disk 67 was the “Syndicate FettisDag Slideshow”. Lotek, from Demozoo, asked if it was possible to separate out the demo (Option 4 on the disk menu) and accompanying files into a separate .ZIP file.
So I took on the challenge. This blog post is an example of this kind of task that I did last week where it had a successful outcome.
The target’s files
After working out what files belonged to the demo and copying to a working folder, the examination started.
There was a LOADER.PRG, several PI1 (Degas art package) files and a separate FLURP.PRG (the main demo). At first glance none of the PI1 files had the usual file lengths of either 32034 or 32066 bytes. So I assumed that there was some kind of file packing involved.
Running the demo directly, not via the loader, proved this as correct. All the graphics in the slideshow were corrupted. So this pointed to the loader being a Trap #1 depacked type.
A what kind of loader?
These loaders would hook into the TOS file loading routine. When the target program issued a FOPEN ($3F) command, the loader would:
Open the file
See if the files was packed with the packer(s) the loader recognises
Depack the file if it is
Hand control back to the original program
As this was a slideshow, this would happen with each PI1 file used by the demo.
So my first step was to open the LOADER.PRG using Easyrider 4. Lots of gobbledygook but the tell tale strings showed bits of “AntiBitOS by Illegal”. Damn, it’s been protected by an anti-cracking tool, written by one of the scene’s most well known Atari ST crackers, Illegal of The Replicants.
However, after posting about this setback in the FB group, I remembered that Orion (also of The Replicants) had released a tool called ‘Dec0de’ a few years ago. It comes in ST and command line PC versions and it removes all kinds of cracker-proof envelopes devised by other crackers as well as commercial protection systems too, especially Rob Northern’s. There’s a full list on Orion’s GitHub area.
I ran the loader through the PC version of Dec0de and out popped a deprotected version of it. Loading that new file into Easyrider confirmed my suspicions that it was a Trap #1 loader and that it depacked data files on the fly. We’re getting somewhere now!
Oh, wait a minute, it’s not a known depacker header that the loader is looking for. The norm for most file packers on the Atari ST was to have the first four bytes as a mini header to say “this file was packed with this range of packers”. But in this case, the demo creators have changed the first 4 bytes of each packed file to mask which packer was used. Grumble, grumble …. more blocks in the way.
The loader was disassembled (via Easyrider than through Stew’s excellent Convert tool), into a source code file. I now have to compare this routine against my collection of depack routines I’d collected whilst writing my Multi Depacker tool that I’d coded over 25 years ago.
With luck, the second depacker routine that I looked at was Ice Packer v2.20. It was a near perfect match. So let’s try fixing the file headers of the PI1 files using a hex editor back to “Ice!” and see what happens when I try to unpack them.
This worked well for all but two of the files on the STAX disk 62 release that I was working with. They wouldn’t unpack correctly. So close, but so far.
Luckily Lotek had mentioned that this demo was originally released on Syndicate’s Delicious Disk 67. I found that disk on STonish.net, copied the two problematic files to my working folder, hex edited the header to be “Ice!” and they depacked first time. Another step towards a win!
The final step involved more hex editing, this time removal of all the A:\ from the front of the filenames. This would (in theory) allow the demo to run from a hard disk.
Once this was done, I cleared all the temporary files and tools out of my working folder and launched the demo. It all worked and none of the images were corrupted at all!
Here are a couple of the screenshots from the demo:
A .ZIP archive was created with this HD version and posted in the private FB group where these requests appear. (I’m not giving the group name out, so don’t ask).
(OK, it arrived 2 weeks ago, but I forgot to add it to this site).
It’s a dream come true – a souped up ZX Spectrum with all the bells and whistles that allows me to access files as and when I want off an SD card.
It’s what I thought the ZX-MMC would do for my +3, but it’s leaps and bounds ahead. I can see the +3 being sold off once we’re all back to normal, whenever that may be.
Whilst I’m working from home due to COVID-19, I can’t give the machine the full attention that I want to do. There are rumours from work that we might be made to go ‘one week on, one week off’. If this does happen, then I’ll be able to give the machine a lot more of the spare time it needs.
My hats off to Phoebus Dokus as the manual is lip-smackingly gorgeous. As a technical author by trade, it makes me go a little green at the gills 🙂 I just need the time to read it and start programming something in NextBASIC, but that will have to wait a bit.
However, using the good old DZ80 disassembler, I’ve already created some infinite lives pokes for two of the commercial games that I bought and working on the others. These will end up on here as tutorials at some point.
More updates on my progress as the spare time allows!
After rescuing the content to recreate an old page from one of my original websites that covered Atari ST cartridges, I started going through all of the other bits and pieces that were on my website’s ‘To Do’ cards on Trello. There’s still quite a bit to get through!
There are now two new “odds and sods” pages: one for the ZX Spectrum and the other for the Nintendo DS. If you’re a teacher or maybe a quiz master, you might want to grab the NDS stuff, as two of the downloads were as a result of extracting the content of some games aimed at kids. As with anything that anyone extracts from an NDS game, Ninty don’t tend to look on you with bright shiny smiles. So grab ’em whilst you can 🙂
Tools used sections
More guides will be forthcoming on the tools I use / did use to extract the information from both the ZX Spectrum and Nintendo DS will be coming soon.
This also includes my long-winded method on extracting music from NDS games and converting them via MIDI to work in OpenMPT. Although these days it doesn’t support the older Impulse Tracker format, so the guide needs tweaking a little bit first.
Temple of Apshai
Due to the above work on the website, I’ve had to postpone my Atari ST guide on hacking the saved game for this old Epyx title.
The text is approximately 75% complete, but I’ve not made a start on the accompanying saved game editor, which as always, will be coded in GFA BASIC. I might also take a look at the saved game files on other systems too, but that would be a follow-up to the article. AKA don’t hold your breath.
The .ZIP file contains: the hack routine itself, plus a few embellishments like a new GEM font and some music (upgraded to use SNDH format) which plays in the background whilst you’re altering the saved game file(s).
The editor covers the game Legend Of The Sword by Rainbird which was released way back in 1988 (31 years ago!!) and it will allow you to alter the location where your character is currently situated in the game.
The code should be fairly simple to work out and re-use for other games – in case you have an idea for a saved game hack lying around? If you do use it, let me know how easy it was to adapt.
After a flurry of work – albeit slowly due to the snail-pace connection at the B & B where I lodge during the week – I’ve created an official page where you can get all episodes (so far) of Max Hall’s SID radio show. This includes the original streams in FLAC format too!
I have recently bought into the MiFi device by Three, which gives me a lot more speed when I’m at the B & B. Here’s hoping it helps speed up the process outlined above.
The FLAC files are, as you would suspect, rather large, so they are hosted on my DropBox account, as are the MP3 versions. However, the MP3 variants are also hosted on this website too, with the exception of episode 10 because it was larger than 128Mb.
I didn’t realise was a limit of download files for WordPress sites hosted by my provider, until it blocked me from uploading this particular episode.
In theory, there will still be a minor delay between the episode being made available on MixCloud through to the FLAC/MP3 files appearing on this page. After all, it’s all done in my spare time, so patience is a virtue.
Max Hall is back with the latest episode of his ChipSID Show that he does for Radio Free Matlock.
And, as per usual, a few days afterwards, here’s the downloadable MP3 version done by me for Max.
There are the links for the DropBox and Box-hosted variants below. As previously mentioned in other posts, could some of you please try to use the Box one and not just hammer the DropBox one. A few of you are (according to the Bit.Ly stats produced), so my thanks to you.
I am working on finding a “proper” hosting of these files: either via my own website space and/or make an area available on my NAS to share them from there. However, working away from home each week takes its toll on small projects like these, especially when the broadband speed in the B & B I stay in is 1/50th of what I get back home 🙁