After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 770470 - playstation: Some valid games don't have a BOOT header
playstation: Some valid games don't have a BOOT header
Status: RESOLVED FIXED
Product: gnome-games
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2016-08-27 07:37 UTC by Adrien Plazas
Modified: 2016-08-28 07:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
playstation: Prefix consts with BOOT in the PlayStationHeader (2.26 KB, patch)
2016-08-28 07:34 UTC, Adrien Plazas
committed Details | Review
playstation: Add PlayStationHeader.get_id_from_boot() (2.28 KB, patch)
2016-08-28 07:34 UTC, Adrien Plazas
committed Details | Review
playstation: Add PlayStationHeader.is_a_disc_id() (1.55 KB, patch)
2016-08-28 07:34 UTC, Adrien Plazas
committed Details | Review
playstation: Add PlayStationHeader.search_id_in_header() (2.33 KB, patch)
2016-08-28 07:35 UTC, Adrien Plazas
committed Details | Review

Description Adrien Plazas 2016-08-27 07:37:10 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).
Comment 1 Adrien Plazas 2016-08-28 07:34:43 UTC
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.
Comment 2 Adrien Plazas 2016-08-28 07:34:49 UTC
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.
Comment 3 Adrien Plazas 2016-08-28 07:34:57 UTC
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.
Comment 4 Adrien Plazas 2016-08-28 07:35:03 UTC
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.
Comment 5 Adrien Plazas 2016-08-28 07:39:25 UTC
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()