GNOME Bugzilla – Bug 770470
playstation: Some valid games don't have a BOOT header
Last modified: 2016-08-28 07:39:42 UTC
Some valid cue+bin games don't have a BOOT header and hence aren't recognized as such by Games. By investigating I found all of my games' first BIN file to have what looks like a proper header at 0x9320: it is 64 bytes longs, the first 32 bytes are always "PLAYSTATION " and the 32 next always were either: - just spaces (the most common case), - the game's title (and spaces) or - in rare cases, the disc's ID in the from "XXXX-00000" or "XXXX_00000" (and spaces).
Created attachment 334296 [details] [review] playstation: Prefix consts with BOOT in the PlayStationHeader Also rename get_header_offset() into get_boot_offset(). This will be needed in the next commits as we will introduce and parse a new and more generic header section.
Created attachment 334297 [details] [review] playstation: Add PlayStationHeader.get_id_from_boot() Add the get_id_from_boot() method to look for IDs in the BOOT header section. This will allow to look for IDs in more places in the next commits.
Created attachment 334298 [details] [review] playstation: Add PlayStationHeader.is_a_disc_id() This allows to be more sure we found a valid disc ID and hence that the header is valid.
Created attachment 334299 [details] [review] playstation: Add PlayStationHeader.search_id_in_header() Look for IDs in the 'PLAYSTATION' header. This allows to support games having no 'BOOT' header but containing the disc's ID in the 'PLAYSTATION' header.
Attachment 334296 [details] pushed as af0cad9 - playstation: Prefix consts with BOOT in the PlayStationHeader Attachment 334297 [details] pushed as c2e8fc2 - playstation: Add PlayStationHeader.get_id_from_boot() Attachment 334298 [details] pushed as c81da85 - playstation: Add PlayStationHeader.is_a_disc_id() Attachment 334299 [details] pushed as 78eeb73 - playstation: Add PlayStationHeader.search_id_in_header()