Skip to content

Commit

Permalink
add extra debug when reading game_id from a disc
Browse files Browse the repository at this point in the history
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
  • Loading branch information
sahlberg committed Sep 30, 2023
1 parent 78f2c22 commit b25cb84
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pop-fe.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,18 @@ def get_gameid_from_iso(path='NORMAL01.iso'):
print('Failed to read game id. Falling back to raw read')
with open(path, 'rb') as f:
f.seek(0x8028)
buf = str(f.read(9))[2:-1]
_b = f.read(9)
print('RAW', _b)
buf = str(_b)[2:-1]
return buf

# extra debug
print('SYSTEM.CNF:', buf)
with open(path, 'rb') as f:
f.seek(0x8028)
_b = f.read(9)
print('BUF read from 0x8028', _b)

idx = buf.find('cdrom:')
if idx < 0:
raise Exception('Could not read system.cnf')
Expand Down

0 comments on commit b25cb84

Please sign in to comment.