MiSTer-devel / TurboGrafx16_MiSTer

TurboGrafx-16 CD / PC Engine CD for MiSTer
94 stars 57 forks source link

Galaxy Fraulein Yuna HuVideo regression #162

Closed dshadoff closed 2 years ago

dshadoff commented 2 years ago

One of the recent changes between 2021-06-19 and now (2021-09-10) altered how the Galaxy Fraulein Yuna HuVideo disc works; there is now some corrupted audio and video for a brief moment, early in the playback (when CD seek is set to Normal).

log output with CD Seek = "Normal":

PCECD: Command READ6, lba = 100361, cnt = 1
From sector 100362 to sector 100365:
Time = 33.00 milliseconds
seek time ticks: 2
PCECD: Command READ6, lba = 100365, cnt = 120
seek time ticks: 0
PCECD: Command READ6, lba = 100485, cnt = 120
PCECD: Command undefined, [0] = FF, [1] = FF, [2] = FF, [3] = FF, [4] = FF, [5] = FF
seek time ticks: 0
PCECD: Command READ6, lba = 100605, cnt = 120

The "Command undefined" line seems to be related to the problem.

log output with CD Seek = "Fast" (with no similar problem during playback):

PCECD: Command READ6, lba = 100357, cnt = 3
seek time ticks: 0
PCECD: Command READ6, lba = 100361, cnt = 1
seek time ticks: 0
PCECD: Command READ6, lba = 100365, cnt = 120
seek time ticks: 0
PCECD: Command READ6, lba = 100485, cnt = 120
seek time ticks: 0
PCECD: Command READ6, lba = 100605, cnt = 120
seek time ticks: 0
PCECD: Command READ6, lba = 100725, cnt = 120
seek time ticks: 0
PCECD: Command READ6, lba = 100845, cnt = 120
dshadoff commented 2 years ago

Issue doesn't appear when using the 2021-07-25 version of the core with the current Main_MiSTer; it may be that the rework of the timer has slightly affected the speed of SCSI requests, which are now slightly too fast (or too slow).

Perhaps some minor adjustment in the Main_MiSTer timing is needed.

dshadoff commented 2 years ago

After further testing, I found that older cores also failed in this way, and even when CD Seek = "Fast" - although much less often. So it seems that the sectors are arriving too slowly in the core even in these situations sometimes.

It may be due to recent TIMER changes, or SDCard reading may be slightly slower on the new Linux, but the result is that "CD read speed" needs to be slightly increased in Main_MiSTer.

I have made that adjustment and performed some testing on the usual problem games, and found it to work. Some minor seek time adjustments may be needed in future, in case lip-syncing is affected.

dshadoff commented 2 years ago

Fixed in latest release