Oxford Trivia corrupt cart fix, Pascal?

Anything QL Software or Programming Related.
User avatar
Chr$
QL Wafer Drive
Posts: 1304
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Oxford Trivia corrupt cart fix, Pascal?

Post by Chr$ »

I thought I'd put this out here in case anyone with a lot more knowledge than me is able to fix this issue or offer some guidance.

I have an original copy of Oxford Trivia by Talent. There are 2 cartridges, one for the game and one for the questions. Both have corruption but the corruption to the questions cartridge is probably not terminal as it only affects 4 files that appear to be question and answer sets - the other categories are ok, so probably work.

The corruption to the main game cartridge is more severe, it has the following damaged files:

GRAPHICS
TRIV_3g_PEXE

The latter is the main exe file for the game.

I got copies of both those files from Rich. Both are the same size as the corrupt files my the original dump of the cart so I thought I may be able to copy the good files over the corrupt ones in the mdv dump, which I think has worked for the GRAPHICS file, but something else goes wrong and when it attempts to load it illuminates all of the mdv lights (in qemulator) and locks up. There is some kind of copy protection as the instructions state that it requires the original to be in mdv1_. I thought that having good files on an original dump image of the cartridge might fix it (it has for other games) but no, perhaps it checks something else and me copying a good file over a bad one has destroyed whatever its looking for.

To run, it requires the game cart in mdv1_ and the questions cart in mdv2_.

A (windows) zip is attached which contains:

Oxford Game Original.mdv - the original dump made using mdump_task from Danile Terdina
Oxford Game Patched.mdv - original dump with files GRAPHICS and TRIV_3g_PEXE copied over the corrupt originals
Oxford Questions Original.mdv - original dump of the questions cartridge, which has corruption to MUSIC, SPORT, HISTORY and CINEMA.
OxfordTrivia1.mdv - The version of the Game cart supplied by RWAP that contains all good files but doesn't work either.
OxfordTrivia2.mdv - The version of the Questions cart supplied by RWAP that contains all good files.

While trying various things I did at one stage get the following Pascal error:
Pascalerror.png
This is the screen from dumping with mdump_task. Could there be 2 deliberate missing sectors that are something to do with the copy protection? Just a wild guess, I have no idea, but me copying a good file over the corrupt one would, I assume, change those missing sectors?
20220809_184800.jpg
(As this is broken and is useless as is, I saw no potential issue with copyright infringement)
Attachments
Oxford Trivia.zip
(247 KiB) Downloaded 47 times


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Oxford Trivia corrupt cart fix, Pascal?

Post by tofro »

There is an unlimited number of possible ways you can base copy-protection on a µDrive on. The most popular ones are:
  1. deliberately corrupt sectors that have a specific sector #
  2. deliberately missing sectors with a specific sector #
  3. deliberatly duplicate sectors that allow to read the same sector multiple times within less than 7 seconds
a) could be your case. Most copy programs won't even touch a corrupt sector, rather than trying to copy it. Hard to say after such a long time whether a sector is corrupt today because of old age or on purpose, though. Mdump should, however, try to copy them nevertheless? If mdump marks a sector as bad, copying a new file on top of that image shouldn't "fix" that sector, but rather not use it at all. Also, those protection schemes would rather not put data in the "corrupt" sectors, they normally simply check whether that specific sector is marked as bad in the map.

b) is very much the same as a), but a copy program, even a good one, would tell you the sector is missing (I don't think mdump fixes that, but it apparently detects it)

c) Is the hardest one and very probably wouldn't even be detected by mdump.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: Oxford Trivia corrupt cart fix, Pascal?

Post by RWAP »

There is no need to worry about copyright here - this seems to be the only copy of the program - Tom Dolezal (Talent) did not even recall the program, and I have all of his original microdrive carts (this was not in there).

The questions are indeed easy to fix - as they are plain text from memory

I know that Talent tended to use the specific corrupt sectors as copy protection, but did seem to use other forms - such as the name of the cart, or a hidden filename.

They did have an inhouse cartridge copier - although it does not list Oxford Trivia, it may give a clue!! (attached) - presumably the machine code (copier) routine does something about sectors
Attachments
Cartridge MAKER - In House.zip
(2.84 KiB) Downloaded 50 times


User avatar
Chr$
QL Wafer Drive
Posts: 1304
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Re: Oxford Trivia corrupt cart fix, Pascal?

Post by Chr$ »

Thanks Rich and tofro.

I've just been looking more in depth at cartridge data structure. Quite interesting, I think I'm finally understanding it better. This was helpful (the well regarded QL Advanced User Guide by Adrian Dickens):

https://datassette.nyc3.cdn.digitalocea ... _guide.pdf


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: Oxford Trivia corrupt cart fix, Pascal?

Post by Martin_Head »

Yesterday I started having a look at the dump of the game image.

I have a program to examine the Mdump images. I thought I had done a version of the program that covered Mdump2. But I cannot find it, So I am having to recreate it.

There is a block of 232 copies of bad sectors. I just now need to identify which sectors are the actual bad ones. And the plan is to take a copy of the data block from a good sector in the RWAP image, and paste it into the original image. That will hopefully keep any copy protection happy.

I think there might be something funny going on in the directory (copy protection?) There are two entries for a program named 'cross'. One of them seems to be deleted, as the file length is zero.


User avatar
Chr$
QL Wafer Drive
Posts: 1304
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Re: Oxford Trivia corrupt cart fix, Pascal?

Post by Chr$ »

Martin_Head wrote:Yesterday I started having a look at the dump of the game image.

I have a program to examine the Mdump images. I thought I had done a version of the program that covered Mdump2. But I cannot find it, So I am having to recreate it.

There is a block of 232 copies of bad sectors. I just now need to identify which sectors are the actual bad ones. And the plan is to take a copy of the data block from a good sector in the RWAP image, and paste it into the original image. That will hopefully keep any copy protection happy.

I think there might be something funny going on in the directory (copy protection?) There are two entries for a program named 'cross'. One of them seems to be deleted, as the file length is zero.
That would be amazing Martin. This one truly is MIA by the looks of it.

The actual cart itself has a missing write protect tab and there are no signs that anything was ever stuck on it, so that business with the 'cross' file is probably original.


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
User avatar
Chr$
QL Wafer Drive
Posts: 1304
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Re: Oxford Trivia corrupt cart fix, Pascal?

Post by Chr$ »

Having spent some of today looking at the hex of mdv carts and also using Cart Doctor to tell me which blocks are bad, this is the probably useless info that I've come up with:

Cart Dr says that within the TRIV_3g_PEXE file that 3 blocks are suspect, namely the: $0A, $1A and $3B.

Counting along and finding those in the sector map (next to file no. 03) and it reveals that those blocks are in sectors 160 ($A0), 166 ($A6) and 165 ($A5).

Is that correct, am I doing this right? :?

After that I get confused as I can't find any sectors numbered $A0, $A6 or $A5.


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
User avatar
M68008
Trump Card
Posts: 223
Joined: Sat Jan 29, 2011 1:55 am
Contact:

Re: Oxford Trivia corrupt cart fix, Pascal?

Post by M68008 »

Missing sectors are usually caused by the sector header area being corrupted on the tape.


User avatar
Chr$
QL Wafer Drive
Posts: 1304
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Re: Oxford Trivia corrupt cart fix, Pascal?

Post by Chr$ »

M68008 wrote:Missing sectors are usually caused by the sector header area being corrupted on the tape.
I see. Ok, so I could potentially paste them in. Will experiment with that.

So the 'additional copies of bad sectors', could the actual data be among those somewhere, with a different number?


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: Oxford Trivia corrupt cart fix, Pascal?

Post by Martin_Head »

Yesterday afternoon, I added some routines to my dump utility program.

I added a command that, given a file number. It scans the Microdrive map, Identifying all the blocks for that file. Then it displays hex dumps of each of the sectors of the file in order.
And does the checksum of the data block, and compares it with the stored checksum.

Looking at my notes of yesterday. File 2 (GRAPHICS) has one bad sector, Block $0F

File 3 (TRIV_3g_PEXE) has 5 bad sectors. Two of which block numbers $0A, and $2B (but that might be $3B, as I have written down $032B twice) are not found in the main image. Sector 160 ring a bell as one of the missing one's. Also blocks $1A, $2B, and $4C have bad checksums.

Note that in the image file there are 200+ bad sectors stored by the Mdump program at the end. They are mostly around sector numbers 150 to 170.

There are also some "unused" sectors with block headers of $FD00 that have something in them, and bad checksums. I don't know if that's just corruption, or some kind of copy protection. If it was leftovers of a deleted file, I would have expected the map to flagged $FD00, but the actual sectors block header with a file/block number from the deleted file.

If you do a dump of the directory, file $00, block $00. You will see that there are two files named 'cross'. The second one with a zero file length. Which looks like a deleted file.

But I can't quite see how that could have happened normally. It suggests that there were 6 files saved, then the 5th one was deleted, and then patched to be another cross.

But that's about as far as I got yesterday.


Post Reply