Skip to content

Commit

Permalink
Try alternative way to find disc id if system.cnf is missing
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 29, 2023
1 parent 84c53d4 commit 87b2893
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 3 additions & 0 deletions gamedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -49322,6 +49322,9 @@
'url': "games/J/N/SLPS-00006.html",
'id': 'SLPS00006',
'title': "NEKKETSU OYAKO",
'pic0': 'https://images.launchbox-app.com/822f44c5-9aa8-4182-8a30-48dfd566cc7f.png',
'pic1': 'https://images.launchbox-app.com/6c57475d-0c36-4462-879c-4a0060035eb7.png',
'snd0': 'https://www.youtube.com/watch?v=kvhuLRyVN4w',
},
'SLPS01616': {
'url': "games/J/N/SLPS-01616.html",
Expand Down
9 changes: 3 additions & 6 deletions pop-fe.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,9 @@ def get_gameid_from_iso(path='NORMAL01.iso'):
except:
print('Failed to read game id. Falling back to raw read')
with open(path, 'rb') as f:
buf = f.read(10*1024*1024)
idx = buf.find('cdrom:'.encode())
if (idx > 0):
buf = str(buf[idx:idx+1024])
else:
return 'UNKN00000'
f.seek(0x8028)
buf = str(f.read(9))[2:-1]
return buf

idx = buf.find('cdrom:')
if idx < 0:
Expand Down

0 comments on commit 87b2893

Please sign in to comment.