1

I am trying to recover a scid database from 2019, but only have the respective .sg4 and .sn4 files left and am missing the .si4 file. From my understanding, the actual game data is stored in the .sg4 file, which is really what I care about. I switched laptops many years ago, and being much younger and careless at the time I did not check if I had all the appropriate files before discarding the old laptop. This has been on my mind for quite some time, and I was wondering if it was possible at all to still recover the game data stored in the .sg4 file. I am desperate to recover the database as it contains the games from the tournament where I won my FIDE Master title.

2
  • I'm willing to take a crack at coding a sg4 -> pgn converter. I've installed SCID and screwed around with a few test databases to see whether I can crack the encoding and it totally looks doable. Are you willing to upload your sg4 and sn4 files to a Google Drive? Unfortunately StackExchange doesn't seem to have a DM function; if you're on Lichess or chess.com I'm happy to comment my username and we can DM that way.
    – KnightFork
    Commented Jun 10 at 7:41
  • Of course, thank you so much I really appreciate your effort. The google drive of the files and my chess.com are as follows: drive.google.com/drive/u/0/folders/… chess.com/member/huskywithahat Commented Jun 10 at 21:38

2 Answers 2

0

I've got it partially cracked. Each game begins with 0x0000 and ends with 0x0f. Each move is one byte, except for some queen moves.

The first nybble of each move is the piece type. There's a mapping for each of the 8 pawns by starting file, and each piece (separate for queenside knight and kingside knight, etc). c is the e-pawn, d is the f-pawn, e is the g-pawn... The second nybble is the move direction. It seems to be symmetrical for pawns, but not for pieces.

Granted I'm using a more recent version of SCID and it's outputing sg5 instead of sg4, but unless there've been significant changes I think I can probably crack the encoding and write a converter with a few good evenings' focus time.

0

I am sure it is possible. The information is there (well, the game information is there - it wouldn't know who played which game without the index, though) and everything is open source. But if nobody has created such a recovery tool, it would require programming.

I tried (with copies, of course) deleting one of my .si4 files while leaving the .sg4 and .sn4, to replicate your situation. I then took a totally separate .si4 and renamed it to match the deleted file, to try to trick the program. The effectiveness was... slightly better than zero. A very few games were able to load. (Some required double-clicking on the game, clicking "OK" on the error message, and double-clicking again.) You might be able to use this to at least get a game or three out of the database without learning to code.

1
  • I appreciate your input - I figured out that I had a total of 17 games in the database only and attempted to use a blank .si4 file containing 17 games to match to no avail; I also tried to use the large example database included with SCID which got my opponent names to load correctly but unfortunately nothing else. Concerning my coding knowledge, I have practically zero so that is not a likely avenue I can pursue. If someone is able to develop a tool, I am willing to pay for your time and effort. Otherwise, I think it's gone for good and that's ok; it's a good life lesson regardless. Commented Jun 8 at 4:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.