Skip to content

Commit

Permalink
pop-fe: fix hanging game Fear Effect NTSC-U and others
Browse files Browse the repository at this point in the history
When the TOC from cu2, I computed end of track as one frame too little
which caused some games, like Fear Effect NTSC-U, to hang at the PS1 logo.
This is now corrected and the games no longer hangs.

Thanks to kozarovv for debugging the issue and finding the root cause
of the hangs.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
  • Loading branch information
sahlberg committed Sep 9, 2023
1 parent 0fd9562 commit 51e24ec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions gamedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1857,6 +1857,7 @@
'url': "games/J/Y/SLPS-02274.html",
'id': 'SLPS02274',
'title': "YUYAMI TOORI TANKENTAI",
'pic0': 'https://images.launchbox-app.com/e2bdebce-7a6a-45a5-99f1-a27826ef1bb0.png',
},
'SLPS01460': {
'url': "games/J/Y/SLPS-01460.html",
Expand Down
18 changes: 15 additions & 3 deletions pop-fe.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,9 +754,21 @@ def bcd(i):
# number of tracks
toc[17] = bcd(num_tracks)
# size of image
toc[27] = bcd(int(trk_end[:2]))
toc[28] = bcd(int(trk_end[3:5]) - 2)
toc[29] = bcd(int(trk_end[6:8]))
m = bcd(int(trk_end[:2]))
s = bcd(int(trk_end[3:5]) - 2)
f = bcd(int(trk_end[6:8]))

# lead-out is the next frame
f = f + 1
if f == 75:
s = s + 1
f = 0
if s == 60:
m = m + 1
s = 0
toc[27] = m
toc[28] = s
toc[29] = f

track = 1
for line in lines:
Expand Down

0 comments on commit 51e24ec

Please sign in to comment.