Help with Crystal Rainforest Disks

subjects relating to classic games for the archimedes and risc pc
Post Reply
Darkpilaf
Posts: 9
Joined: Sat Oct 29, 2022 11:48 am
Contact:

Help with Crystal Rainforest Disks

Post by Darkpilaf »

Hi there guys im just wondering if theres anyone that could help me? I have two sets of the Crystal Rainforest disks one copy is actually unused as far as im aware and its complete with all the teaching documents etc. Is there anyone able or willing to get these in a format I can use on an emulator? I would happily send them to someone to do. I dont have the expertise or the equipment to do so, i attempted it but failed miserably.

I just want to time travel back to the 90s and to let my young kids play it aswell. I also have the windows version but it just doesnt sit right with me.

Any help appreciated. Thanks.
sirbod
Posts: 1624
Joined: Mon Apr 09, 2012 9:44 am
Location: Essex
Contact:

Re: Help with Crystal Rainforest Disks

Post by sirbod »

Sherston was purchased by Big Clever Learning, which is actively trading.

If someone would like to start a conversation with BCL about the Sherston back catalogue of Archimedes titles, I'll be happy to request a legal means to release them.
User avatar
danielj
Posts: 9900
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Help with Crystal Rainforest Disks

Post by danielj »

I'm minded to let sleeping dogs lie on that one. AFAIK they have no records of the archimedes back catalogue.

@Darkpilaf - I believe we'd imaged disks for you and the issue was just getting them to run under the emulator?

d.
Darkpilaf
Posts: 9
Joined: Sat Oct 29, 2022 11:48 am
Contact:

Re: Help with Crystal Rainforest Disks

Post by Darkpilaf »

Woah i didnt mean to start a legal battle haha.

Yes danielj that is my issue but i didnt want to implicate anyone as to where i got them, i thought it easier just to start at square one. Really sorry, i didnt mean to offend anyone.
User avatar
danielj
Posts: 9900
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Help with Crystal Rainforest Disks

Post by danielj »

I'd start from "I have converted my discs to HFE, but I can't get them to work with arculator!" :)

d.
philpem
Posts: 1161
Joined: Fri Apr 04, 2014 6:42 pm
Contact:

Re: Help with Crystal Rainforest Disks

Post by philpem »

I've previously imaged Crystal Rainforest from my own discs and created HFEs which worked in Arculator - what issues are you having?

TCRF uses the same copy-protection scheme as most Sherston titles and should work reasonably well on Arculator provided things are set up correctly.
Questions about software preservation (BBC, RISC OS or other platforms)? Please feel free to ask.
Currently looking for RISC OS software to archive and preserve, please drop me a PM if you have any to offer.
Darkpilaf
Posts: 9
Joined: Sat Oct 29, 2022 11:48 am
Contact:

Re: Help with Crystal Rainforest Disks

Post by Darkpilaf »

Hi there. I have the 4 disks in HFE format and i just cant get it to run. Mounting the key disk and it just asks for the startup disk, and doesnt go any farther. Ive tried the other disks and they just state adfs::crystal1.$.!CRYSTAL.!Run' not found.

The key disk is the only thing that does anything and thats not very much. I've loaded other games through arculator so i think the setup is fine. Just at a brick wall with this.
philpem
Posts: 1161
Joined: Fri Apr 04, 2014 6:42 pm
Contact:

Re: Help with Crystal Rainforest Disks

Post by philpem »

Is it possible that your discs might be copies? Can you post a photo of them?

I've attached two screenshots of HxCFloppyEmulator. If you load the image file (whatever you converted into a HFE) into it, open the Track Analyzer and set "View Mode" (bottom right) to "Dummy Disk", you should have an image that looks like the bottom image (with the two round discs - which are each side of the disc). All the sectors should be green except for one on side 0 track 0 (the outermost track).

If you switch to "Stream view (fat pixels)" and select track 0 side 0, you should see a normal track, but sector 4 should look like noise. See 2nd photo.

If sector 4 looks normal/green, then your discs are either copies/backups, or have been damaged or reformatted. It wasn't unusual back-in-the-day for schools to run Crystal Rainforest off of a backup disk. The teacher would load from the backup disk, pop in the original when Crystal Rainforest asked for it, then switch back to the backup before starting the game.
Attachments
Screenshot_2023-06-26_11-38-03.png
Screenshot_2023-06-26_11-36-07.png
Questions about software preservation (BBC, RISC OS or other platforms)? Please feel free to ask.
Currently looking for RISC OS software to archive and preserve, please drop me a PM if you have any to offer.
philpem
Posts: 1161
Joined: Fri Apr 04, 2014 6:42 pm
Contact:

Re: Help with Crystal Rainforest Disks

Post by philpem »

Following on from this, I had a bit of a dig ...!

I was under the impression the HFE format supported weak sectors aka weak bits (which is the copy protection technique Sherston used). I was half right: HFE v3 supports it (via a special opcode) but not HFE v2. Arculator 2.1 and earlier only supports HFE v2.

Arculator 2.2 adds support for HFE v3, but doesn't support the "random byte goes here" opcode in the HFE v3 track data.

... You nerdsniped me, how dare you!

I spent my lunch break figuring out what was going on, and chatting to Sarah, and finally got Crystal Rainforest to boot. You need a few things:

- Arculator 2.2 or later
- A one-line patch to the source code before compiling it, see viewtopic.php?f=30&t=27173&p=396572#p396572
- HFEv3 format images of Crystal Rainforest (in theory SCP should work too, but they don't - Arculator probably doesn't do the analysis needed to spot the weak bits)

With all three of those things, Crystal Rainforest will boot. You can even copy it onto the hard disc and it will run from there -- but it will ask for the Key Disc to run.


At some point I need to do a proper writeup about the protection scheme as it's pretty nifty ... but for anyone interested in the cliff notes ...

The whole program is written in BASIC, and the protection code is in !Crystal.code, called by !RunImage. Crystal chains a bunch of BASIC programs in turn to implement the game.

The main protection function is called PROCtidy, and there are two others called PROCz and PROCz2 which seem to de-obfuscate bits of the code.
For added fun, Crystal sets an environment variable (Crystal$Tidy) to the address it loaded the disc protection routine at.

The protection check wants to see a few things to declare the disc original:

- Read the protection sector twice with ADFS_DiscOp, into two different buffers. Both must return with the V flag set (failed). i.e. a disk error (the buffer will still be filled in)
- Check that the first 32 bits of the read buffer don't match one of two magic values stored in memory "somewhere". If they do, fail. (I guess this is to prevent obvious ways of bypassing the protection e.g. sector stacking)
- Check that the first 63 words of the sectors are different i.e. they didn't read the same data. (if the first 63 words match, fail, this isn't an original disc)
- Check that there's a directory called ADFS::0.$.!Crystal (i.e. a floppy disc containing the Crystal Rainforest application)
- After all of that, if all the checks passed, return an "OK" result in R0.

Badger Tails and other Sherston Archimedes titles probably do the disc protection in roughly the same way.
The CD titles probably remove it in a fairly obvious way.

There doesn't seem to be any code to make sure you haven't mucked with the assembly code (say, to always return a successful result) but I could be wrong about that. I haven't looked at the obfuscation routines yet.
Questions about software preservation (BBC, RISC OS or other platforms)? Please feel free to ask.
Currently looking for RISC OS software to archive and preserve, please drop me a PM if you have any to offer.
Darkpilaf
Posts: 9
Joined: Sat Oct 29, 2022 11:48 am
Contact:

Re: Help with Crystal Rainforest Disks

Post by Darkpilaf »

philpem wrote: Mon Jun 26, 2023 11:42 am Is it possible that your discs might be copies? Can you post a photo of them?

I've attached two screenshots of HxCFloppyEmulator. If you load the image file (whatever you converted into a HFE) into it, open the Track Analyzer and set "View Mode" (bottom right) to "Dummy Disk", you should have an image that looks like the bottom image (with the two round discs - which are each side of the disc). All the sectors should be green except for one on side 0 track 0 (the outermost track).

If you switch to "Stream view (fat pixels)" and select track 0 side 0, you should see a normal track, but sector 4 should look like noise. See 2nd photo.

If sector 4 looks normal/green, then your discs are either copies/backups, or have been damaged or reformatted. It wasn't unusual back-in-the-day for schools to run Crystal Rainforest off of a backup disk. The teacher would load from the backup disk, pop in the original when Crystal Rainforest asked for it, then switch back to the backup before starting the game.
Thank you so very much for all your effort. I have checked all four disks and viewing all the dummy disks looks identical to your image, but when i change to Stream view (fat pixels) it says the track doesnt have any stream information. Stuck again #-o

I have downloaded Arculator v2.2 and applied the patch as per the instructions and just hitting the same problem :(

Edit: The HFE's i have arent of my disks, i acquired those here. The sets i have are all original, as far as im aware.
philpem
Posts: 1161
Joined: Fri Apr 04, 2014 6:42 pm
Contact:

Re: Help with Crystal Rainforest Disks

Post by philpem »

Darkpilaf wrote: Mon Jun 26, 2023 11:27 pm Thank you so very much for all your effort. I have checked all four disks and viewing all the dummy disks looks identical to your image, but when i change to Stream view (fat pixels) it says the track doesnt have any stream information. Stuck again #-o

I have downloaded Arculator v2.2 and applied the patch as per the instructions and just hitting the same problem :(

Edit: The HFE's i have arent of my disks, i acquired those here. The sets i have are all original, as far as im aware.
If you've got HFE V2 files, you won't be able to play them. The HFE V2 format can't store the copy protection sector -- or rather it has no way of describing it.

You've got two routes forward - either:

- Pick up a Greaseweazle and a floppy drive and image your disks as SCP files, then convert to HFEv3 with the HxCFloppyEmulator software.
- Ask the person who sent you those images to re-image the Keydisk as HFEv3

Either way you need Arculator V2.2 with my patch, but it sounds like you're sorted on that front :)
Questions about software preservation (BBC, RISC OS or other platforms)? Please feel free to ask.
Currently looking for RISC OS software to archive and preserve, please drop me a PM if you have any to offer.
User avatar
danielj
Posts: 9900
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Help with Crystal Rainforest Disks

Post by danielj »

Thanks Phil - I think that should be sorted :)
Darkpilaf
Posts: 9
Joined: Sat Oct 29, 2022 11:48 am
Contact:

Re: Help with Crystal Rainforest Disks

Post by Darkpilaf »

#-o :(

Useless one here again. I've tried it with a version 3 key disk and its still says the same. Keeps asking for the startup disk. I've been following the instructions in the box I.E loading from floppy. Is this where I'm going wrong? I've tried creating a hard drive but I've failed in that as well :(

Forgive my stupidness, but if i drag the crystal icon from the keydisk onto one from the other disks it says file copying but then it eventually stops saying the disk is full. Is this just copying to the other floppy?

I assume i have entered the patch correctly? ive just copy and pasted.

Really sorry you guys, you have helped me so much and im just letting the newbie side down. Im willing to replace any lost lunches :lol:
philpem
Posts: 1161
Joined: Fri Apr 04, 2014 6:42 pm
Contact:

Re: Help with Crystal Rainforest Disks

Post by philpem »

Darkpilaf wrote: Tue Jun 27, 2023 10:50 pm #-o :(

Useless one here again. I've tried it with a version 3 key disk and its still says the same. Keeps asking for the startup disk. I've been following the instructions in the box I.E loading from floppy. Is this where I'm going wrong? I've tried creating a hard drive but I've failed in that as well :(

Forgive my stupidness, but if i drag the crystal icon from the keydisk onto one from the other disks it says file copying but then it eventually stops saying the disk is full. Is this just copying to the other floppy?

I assume i have entered the patch correctly? ive just copy and pasted.

Really sorry you guys, you have helped me so much and im just letting the newbie side down. Im willing to replace any lost lunches :lol:
Once you've patched the source code, you need to recompile Arculator - I've no idea how you do this on Windows, but on Linux you'd just type "make" again (per the Arculator instructions). I don't have a pre-patched Windows version sadly.

Regarding hard drive images, HostFS is usually easier to set up and use, so I'd suggest setting that up in the first instance.
Questions about software preservation (BBC, RISC OS or other platforms)? Please feel free to ask.
Currently looking for RISC OS software to archive and preserve, please drop me a PM if you have any to offer.
Darkpilaf
Posts: 9
Joined: Sat Oct 29, 2022 11:48 am
Contact:

Re: Help with Crystal Rainforest Disks

Post by Darkpilaf »

Update:

I have installed via hard drive and followed the in box instructions on how to launch it and its still a dead end. It just asks for the startup disk, also running from the keydisk floppy it also asks for the key disk. Im so close i can feel it #-o

As you say the patch is for the linux version, so i doubt me changing it has had any effect. I might just have to get a linux machine running.
Post Reply

Return to “32-bit acorn software: classic games”