Repton (1, the original) disc variants found

reminisce about classic bbc micro and acorn electron games here
Related forum: adventures


Post Reply
User avatar
scarybeasts
Posts: 554
Joined: Tue Feb 06, 2018 7:44 am
Contact:

Repton (1, the original) disc variants found

Post by scarybeasts » Sun Aug 30, 2020 11:44 pm

Hi,

HFE files posted here: viewtopic.php?f=32&t=20386
Thanks to billcarr for capturing.

The two variants are very different: different protection, disc layout, and one has an extra MODE7 loading screen.

I have no idea if the game code or data differs, though. Given that Repton (1, the original) is such a classic, I wouldn't be surprised if there was someone fancying to take a look?

billcarr raised a good question about tooling for this sort of thing. The disc layouts are very different so comparing tracks, sectors or files is likely not useful. Is there some other clever tricks we could pull? I was wondering if beebjit could assist in some way with some extra features. In some ways, what really matters is the state of memory after the game has loaded. Could we checksum pages that contain 100% static (not self-modified) code and data? Something else?
Ideas actively sought.


Cheers
Chris

User avatar
billcarr2005
Posts: 1593
Joined: Fri Sep 09, 2005 4:01 pm
Location: UK
Contact:

Re: Repton (1, the original) disc variants found

Post by billcarr2005 » Mon Aug 31, 2020 2:10 am

With a breakpoint set at &2640, the resulting code from 1900+5600 (savemem DREPTON2 1900 5600) can be safely saved from both versions... and they're identical :)
D.REPA & D.REPTON1 have some minor differences though

User avatar
Diminished
Posts: 519
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Repton (1, the original) disc variants found

Post by Diminished » Mon Aug 31, 2020 3:54 am

Yeah the way I've tackled this sort of thing in the past has been to do something like ... work out where the game's entrypoint is, and then breakpoint it. Provided it's the same in different versions, you can then just dump 32K of RAM from the debugger (I had to add a command to b-em's debugger to do this) and that provides your starting point for comparing the two.

It's not foolproof for various reasons, but it's how I tackled Repton 3.

Disappointing that there are no differences here though!

edit: You know, I once found an obscure bug in Repton 1. Or maybe it's a feature. I think maybe it only occurs on a 32K Model A, since that's what I used to have. I also found an extremely strange workaround. I really should see if I can reproduce it.

User avatar
scarybeasts
Posts: 554
Joined: Tue Feb 06, 2018 7:44 am
Contact:

Re: Repton (1, the original) disc variants found

Post by scarybeasts » Wed Sep 02, 2020 9:45 pm

billcarr2005 wrote:
Mon Aug 31, 2020 2:10 am
With a breakpoint set at &2640, the resulting code from 1900+5600 (savemem DREPTON2 1900 5600) can be safely saved from both versions... and they're identical :)
D.REPA & D.REPTON1 have some minor differences though
Did you have any particular technique for working out where to break and what to save? I'd be interested in trying the same on the Repton 2 variant.
Is there some common trick perhaps for the Superior games where the main game file(s) are not in the DFS catalog?


Cheers
Chris

User avatar
vanekp
Posts: 906
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

Re: Repton (1, the original) disc variants found

Post by vanekp » Wed Sep 02, 2020 10:13 pm

I normal use exmon II to singe step through the short file with then normal loads the deleted data sectors for the main program.
like Repton_2_D1S1_40T_HG3_0756C3B1_1.hfe has a file D.REPB
which is the loader for the main part.
it starts at &0970
if you do a brk at &09B4 you will find the main data from &1D00 - &70A0 (only its still encrypted as the routine it jumps to at &09B4 (&700) decodes that (from the first loader part))
Data is EOR with & #&66
repton2a.png
repton2b.png
in the attached ssd are the files from both the 40 track and 80 track version of repton 2 (Repton_2_D1S1_40T_HG3_0756C3B1_1.hfe Repton_2_D1S1_80T_HG3_64D80D49_1.hfe)
the files R40TEN is the 40 track version of the mail file still encrypted and the R40TUN is the unencrypted version, same for the 80 track files attatch is also the difference between the 2 unencrypted files.
Attachments
Repton2Files.ssd
(85 KiB) Downloaded 8 times
Peter.

User avatar
scarybeasts
Posts: 554
Joined: Tue Feb 06, 2018 7:44 am
Contact:

Re: Repton (1, the original) disc variants found

Post by scarybeasts » Thu Sep 03, 2020 6:03 am

Thanks! A decent list of diffs but very manageable because looks like there's no fundamental shifts / rearrangements.

I'll link the Repton 2 thread to here.
Last edited by scarybeasts on Thu Sep 03, 2020 7:09 am, edited 1 time in total.

User avatar
Diminished
Posts: 519
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Repton (1, the original) disc variants found

Post by Diminished » Thu Sep 03, 2020 6:57 am

scarybeasts wrote:
Wed Sep 02, 2020 9:45 pm
Did you have any particular technique for working out where to break and what to save? I'd be interested in trying the same on the Repton 2 variant.
Is there some common trick perhaps for the Superior games where the main game file(s) are not in the DFS catalog?
I wonder if some stupid heuristic would be any use.

You might expect some stuff to happen at the end of the loader like

- filing system operations cease
- move code down in RAM from higher to lower
- maybe decrypt it as you go? tight EOR loop?
- maybe clear the screen or change MODE
- big program counter jump

Maybe there are some other signs common to early game setup code.

VDU23, VDU19, VDU4 sequences? Scribbling filing system workspaces? Modifying interrupt handlers?

User avatar
Diminished
Posts: 519
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Repton (1, the original) disc variants found

Post by Diminished » Mon Sep 21, 2020 12:11 pm

Diminished wrote:
Thu Sep 03, 2020 6:57 am
scarybeasts wrote:
Wed Sep 02, 2020 9:45 pm
Did you have any particular technique for working out where to break and what to save? I'd be interested in trying the same on the Repton 2 variant.
Is there some common trick perhaps for the Superior games where the main game file(s) are not in the DFS catalog?
I wonder if some stupid heuristic would be any use.
So I wanted to test out a hunch I've had for a little while regarding trying to catch games in their early initialisation stages. I grabbed the fifteen Superior games from the Bill Carr/scarybeasts archive, ran them in beebjit, and set a breakpoint on MOS address &c5b9, which is (apparently) where VDU 5 happens.

The results weren't as good as I'd hoped; the following ten games never seem (officially at least) to call VDU 5 at all (although there is a chance they might do an equivalent operation manually):

Froggy_FSD0322_1
Galaforce_FSD0180_1
Karate_Combat_FSD0175_1
Ravenskull_FSD0182_1
Repton_2_FSD0178_1
Repton_3_FSD0183_1
Repton_FSD0080_1
Strykers_Run_FSD0181_1
Tempest_FSD0176_1
Thrust_FSD0179_1

However, trapping VDU 5 was successful at halting three games during early execution:

Citadel_(Sample)_FSD0548_1:
Citadel_FSD0174_1:

(predictably, this is where I got the idea from)
- success: breaks at title screen
Citadel_(Sample)_FSD0548_1.png

Overdrive_FSD0321_1:
- success: hits after loader:
Overdrive_FSD0321_1.png

Space_Pilot_FSD0574_1:
- success: hits after loader:
Space_Pilot_FSD0574_1.png
One game -- Deathstar -- produced a false positive, tripping the breakpoint while still going through its pre-loading screens.

The good news at least is that there weren't a pile of false positives, so this might at least be helpful as part of some heuristic for halting games at startup, although by no means a silver bullet.

Post Reply

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