WeChall - Sidology

Challenge

Sidology 要求识别三个 Commodore 64 SID 音乐文件的来源游戏。题目提供 sidchall.zip,包含三个 .sid 文件,元数据被部分或完全审查。

As you are quite a good hacker you should have no problem to gather information. So please tell me the name of these games, where I only have the .sid files from.

Solution

SID 文件格式

PSID v2 文件头 124 字节,关键字段(大端序):

偏移 大小 字段 说明
0x00 4 Magic "PSID"
0x04 2 Version 0x0002 = v2
0x08 2 Load addr 0 = 使用 init 地址
0x0A 2 Init addr 初始化入口
0x0C 2 Play addr 播放入口(每帧调用)
0x0E 2 Songs 子曲目数
0x16 32 Name 曲名(NULL 结尾)
0x36 32 Author 作者
0x56 32 Copyright 版权/年份

Python 解析:

1
2
3
4
5
6
7
8
9
10
11
import struct

def parse_sid(path):
with open(path, 'rb') as f:
data = f.read()
init = struct.unpack('>H', data[10:12])[0]
play = struct.unpack('>H', data[12:14])[0]
name = data[22:54].split(b'\x00')[0].decode('ascii', errors='replace')
author = data[54:86].split(b'\x00')[0].decode('ascii', errors='replace')
return {'init': f'${init:04X}', 'play': f'${play:04X}',
'name': name, 'author': author}

sid1: The Last Ninja

1
2
3
4
5
6
7
Magic: PSID v2
Init: $2003, Play: $2000
Songs: 11, Start: 3
Name: "The Last Ninja"
Author: "Ben Daglish & Anthony Lees"
Copyright: "1987 System 3"
Size: 35617 bytes

元数据完整,直接读出。CSDb 确认。

sid2: The Great Giana Sisters

1
2
3
4
5
6
7
Magic: PSID v2
Init: $712A, Play: $7127
Songs: 8, Start: 5
Name: "xxxxxxxxxxxxxxxxxxxxxxx" (23 chars)
Author: "xxxxxxxxxxxeck" (11 + "eck")
Copyright: "1987 Time Warp"
Size: 23517 bytes

名字被审查(x 替换),但版权信息完整。识别方法:

  1. 版权线索: "1987 Time Warp" → Chris Hülsbeck (Hülsbeck 是 Time Warp 的主要作曲家)
  2. 作者后缀: "eck" + 11 个 x → "Chris Hülsbeck" (14 字符,ü→u)
  3. 名字长度: 23 字符 → "The Great Giana Sisters" = 23 字符(含空格)
  4. DeepSID 验证: HVSC 路径 MUSICIANS/H/Huelsbeck_Chris/Great_Giana_Sisters.sid

sid3: Who Dares Wins

1
2
3
4
5
6
7
Magic: PSID v2
Init: $3B0F, Play: $3B00
Songs: 1, Start: 1
Name: "xxxxxxxxxxxxxx" (14 chars)
Author: "xxxxxxxxxxx" (11 chars)
Copyright: "xxxxxxxxxxxxx" (13 chars)
Size: 2983 bytes

全部元数据被审查。识别方法:

  1. 地址搜索: 在 CSDb SID 数据库中搜索 init=$3B0F, play=$3B00 的组合
  2. 唯一匹配: "Who Dares Wins" by Steve Evans (1985, Alligata)
  3. 验证长度:
    • Name: "Who Dares Wins" = 14 字符 ✓
    • Author: "Steve Evans" = 11 字符 ✓
    • Copyright: "1985 Alligata" = 13 字符 ✓
  4. 电影线索: 游戏改编自 1982 年 SAS 电影《Who Dares Wins》(又名 The Final Option)
  5. 非 1987: 游戏发行于 1985 年

CSDb 技术信息验证页: https://csdb.dk/sid/?id=14365

TheLastNinja,GreatGianaSisters,WhoDaresWins