English Amiga Board


Go Back   English Amiga Board > Other Projects > project.SPS (was CAPS)

 
 
Thread Tools
Old 11 December 2019, 14:47   #1
SyX
Registered User

 
Join Date: Sep 2004
Location: Brasil
Age: 45
Posts: 160
How to fix a bad bit in a kryoflux stream raw file...

Just simple like that, I got in contact with people that it is trying to preserve all the spanish commercial 16 bits game releases (Amiga, DOS and ST) and I have been helping them to preserve those releases.

The last game that I have been working is MOT. And our problem was the awful state of the second floppy. After a lot of hard work of the preserving team, we were able to generate all the track files in kryoflux raw format files (trackxx.x.raw) with ONLY ONE bad sector (sector 6 track 25 side 1).

With all that information, I was able to build an image file for testing and trying to find the exactly problem using Amiga MOT cracks and the original ST version. And thanks to that, I discovered that we only got one bad bit of data in that sector; the byte using that bit was $86 and it should be $A6. And lucky for us that bit was used for map data, making very easy to test that it was correct.

And that it is my problem, I am 100% sure that bit is 1 and not 0. But how can I fix that bit in a kryoflux stream file. Is there any tool that I can use for restoring that flux to the correct values? Or I need to manually do that and if that is the answer, where is the specification of this file format?



PS: Funny thing about the spanish MOT release, the intro is in french, hehehe. Although in my crack of MOT, I have replaced the Amiga intro graphics by the ST ones that are in spanish. And I have saved one floppy, too
Attached Thumbnails
Click image for larger version

Name:	discos_mot.jpg
Views:	58
Size:	74.1 KB
ID:	65484  
SyX is offline  
Old 11 December 2019, 14:57   #2
CFOU!
Moderator
CFOU!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 46
Posts: 2,766
i suppose you must be in contact with Denis

Have you ask to Denis if there are SPS special tool for this work?

he can perhaps done IPF version fixed too.

If not, i can done fix via RAWDIC in same time of the disk image creation.

Can you send to me WWarp images of your version to start Whdload's update and fix?
CFOU! is offline  
Old 11 December 2019, 15:35   #3
SyX
Registered User

 
Join Date: Sep 2004
Location: Brasil
Age: 45
Posts: 160
Quote:
Originally Posted by CFOU! View Post
i suppose you must be in contact with Denis

Have you ask to Denis if there are SPS special tool for this work?
It has been a few years since the last time that we spoken. He must be really busy, because I sent an email and a private forum message a few weeks ago and I didn't got any answer.

Quote:
Originally Posted by CFOU! View Post
he can perhaps done IPF version fixed too.

If not, i can done fix via RAWDIC in same time of the disk image creation.
In reality a pair of ADFs are good enough, the game protection is really really stupid.

After you choose an option in the menu, they tried to read a few times the track 79, an unformatted track in the original floppy; and if they read this track 5 times maximum and they don't get different results, then the code goes to:
Code:
 infinite_loop: BRA.S infinite_loop
Then you replace that BRA for the usual NOP and the game continue working perfectly.

You can see my adventures with this game in one of my long funny (only in spanish sorry) blog entries in:
https://syx.neocities.org/posts/olympus_has_fallen.html

Quote:
Originally Posted by CFOU! View Post
Can you send to me WWarp images of your version to start Whdload's update and fix?
I will contact you in private
SyX is offline  
Old 11 December 2019, 16:50   #4
CFOU!
Moderator
CFOU!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 46
Posts: 2,766
interesting
CFOU! is offline  
Old 11 December 2019, 17:06   #5
dlfrsilver
CaptainM68K-SPS France
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 42
Posts: 8,390
Send a message via MSN to dlfrsilver
Quote:
Originally Posted by SyX View Post
It has been a few years since the last time that we spoken. He must be really busy, because I sent an email and a private forum message a few weeks ago and I didn't got any answer.

In reality a pair of ADFs are good enough, the game protection is really really stupid.

After you choose an option in the menu, they tried to read a few times the track 79, an unformatted track in the original floppy; and if they read this track 5 times maximum and they don't get different results, then the code goes to:
Code:
 infinite_loop: BRA.S infinite_loop
Then you replace that BRA for the usual NOP and the game continue working perfectly.

You can see my adventures with this game in one of my long funny (only in spanish sorry) blog entries in:
https://syx.neocities.org/posts/olympus_has_fallen.html

I will contact you in private
Hello SyX, sorry for not answering yet, but i'm overbusy (read : multitasking too much).

About Mot, the game use a weak bit protection hence the 5 reads. If it fails, protection fails.

Can you send me the kryo dump of the game, i will check and see what i can do.
dlfrsilver is offline  
Old 11 December 2019, 17:57   #6
SyX
Registered User

 
Join Date: Sep 2004
Location: Brasil
Age: 45
Posts: 160
Quote:
Originally Posted by dlfrsilver View Post
Hello SyX, sorry for not answering yet, but i'm overbusy (read : multitasking too much).

About Mot, the game use a weak bit protection hence the 5 reads. If it fails, protection fails.

Can you send me the kryo dump of the game, i will check and see what i can do.
Thanks Denis, we will speak later
SyX is offline  
Old 11 December 2019, 20:50   #7
SyX
Registered User

 
Join Date: Sep 2004
Location: Brasil
Age: 45
Posts: 160
Aside of all the related MOT/Whdload comments.



I would be grateful if somebody could tell me about how to fix a bad bit in a kryoflux stream file, when I know which bit is bad. Is there any tool for helping in this basic task of software preservation or can be only be done manually? And in the manual case, where can I get any information about the kryoflux stream raw format?



Because this is not the first time that I am going to need something like that with all those old spanish releases. Thanks!
SyX is offline  
Old 11 December 2019, 21:33   #8
Zer0-X
Registered User

 
Join Date: Apr 2018
Location: Mikkeli / Finland
Posts: 17
Editing KryoFlux raw streamfiles is a bit complicated. Mostly the data is just 8 bit values, but certain small and large values use sort of a simple compression. It's actually quite easy to manually parse basic trackdata from the streamfiles.

But to modify the data, in your case a single bit error could be as simple effect as two combined "pulses", or one split in half. If you remove or add a byte on the streamfile, you have to make sure the overall track "duration" doesn't change (as in combine bytes 0x40 and 0x60 as 0xa0, or split byte 0x80 as 0x40 and 0x40), but there are also data describing where exactly in the streamfile the index signal happens, and those values need to be modified aswell to match what has been added or removed.
Zer0-X is offline  
Old 11 December 2019, 22:02   #9
dlfrsilver
CaptainM68K-SPS France
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 42
Posts: 8,390
Send a message via MSN to dlfrsilver
It's not even the problem. the bad shape of the disk, and more importantly the incorrect cleaning method used have possibly destroyed the weak bit protection track and also hurt the flux of the track with the bad bit on the disk.

I have PMed Syx to review all this ...... Let's hope that other disks have not been cleaned the same way.

the flux files must not be touched. the key is the cleaning method and the tool to use for graphical analyse.

SyX must contact me before continuing further. Otherwise, disk magnetic surface destruction is more than possible.

Last edited by dlfrsilver; 11 December 2019 at 22:08.
dlfrsilver is offline  
Old 12 December 2019, 13:59   #10
SyX
Registered User

 
Join Date: Sep 2004
Location: Brasil
Age: 45
Posts: 160
Quote:
Originally Posted by Zer0-X View Post
Editing KryoFlux raw streamfiles is a bit complicated. Mostly the data is just 8 bit values, but certain small and large values use sort of a simple compression. It's actually quite easy to manually parse basic trackdata from the streamfiles.

But to modify the data, in your case a single bit error could be as simple effect as two combined "pulses", or one split in half. If you remove or add a byte on the streamfile, you have to make sure the overall track "duration" doesn't change (as in combine bytes 0x40 and 0x60 as 0xa0, or split byte 0x80 as 0x40 and 0x40), but there are also data describing where exactly in the streamfile the index signal happens, and those values need to be modified aswell to match what has been added or removed.
Thank you very much Zer0-X



Everything is clear know, and it looks that is going to be a super fun task.
SyX is offline  
Old 16 December 2019, 14:25   #11
SyX
Registered User

 
Join Date: Sep 2004
Location: Brasil
Age: 45
Posts: 160
Only an update about the subject.


First, Thanks to CFOU! for updating the MOT whdload slave for supporting the original spanish release.



He has improved that slave a lot, for starting he made a diskimager for extracting the sectors used by the game as files. I always prefer files over lazy disk images. And thank you for support my hack for at last spanish Amiga users can have the intro in our mother language.


With respect to about how to fix bit errors in stream files, Zer0-X put me in the correct track. I have started to build a tool in Clojure that can predict and fix bad errors in streams with very little manual help, that it would help a lot for future bit problems.
SyX is offline  
Old 16 December 2019, 19:03   #12
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 43
Posts: 16,925
Looks like "Spanish" is missing from the HOL entry also.
DamienD is offline  
Old 16 December 2019, 23:53   #13
dlfrsilver
CaptainM68K-SPS France
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 42
Posts: 8,390
Send a message via MSN to dlfrsilver
Quote:
Originally Posted by SyX View Post
Only an update about the subject.


First, Thanks to CFOU! for updating the MOT whdload slave for supporting the original spanish release.



He has improved that slave a lot, for starting he made a diskimager for extracting the sectors used by the game as files. I always prefer files over lazy disk images. And thank you for support my hack for at last spanish Amiga users can have the intro in our mother language.


With respect to about how to fix bit errors in stream files, Zer0-X put me in the correct track. I have started to build a tool in Clojure that can predict and fix bad errors in streams with very little manual help, that it would help a lot for future bit problems.
And to me for fixing the disk image for preservation, i have made IPF out of the game
dlfrsilver is offline  
Old 17 December 2019, 15:32   #14
SyX
Registered User

 
Join Date: Sep 2004
Location: Brasil
Age: 45
Posts: 160
Quote:
Originally Posted by dlfrsilver View Post
And to me for fixing the disk image for preservation, i have made IPF out of the game
Sure, no problem.

I have uploaded to the Zone NOT official IPFs from the original spanish release of MOT, they are generated by my tool for fixing bit errors in Kryoflux RAW Streams.

The tool is only a few hours of hacking time, and in this case depends in knowing where the error is exactly, for generating possible track candidates that it would fulfill this requirement that I already knew from the beginning of this thread. I am happy that worked so nice at first

Of course, I have tested that those IPFs work perfectly with the update CFOU's whdload slave.


It has been a few funny days of hacking
SyX is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
WAV-16-bit-files converted to RAW-8-bit-files dissident request.Music 15 17 July 2019 15:09
Can WinUAE open Kryoflux stream files (preservation)? softwarefailure support.WinUAE 3 22 May 2018 12:33
Converting between SuperCard Pro and Kryoflux raw/stream file formats mark_k support.Hardware 21 04 August 2014 08:34
[REQUEST] - KryoFlux RAW image support amigafreak68k support.FS-UAE 6 24 June 2014 07:48
KryoFlux: STREAM file format documentation mr.vince project.SPS (was CAPS) 1 26 May 2011 00:40

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.08489 seconds with 16 queries