Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most Dance Dance Revolution games have audio/video desync over time on pi 3b. #91

Open
Jimmynope opened this issue Aug 20, 2017 · 2 comments

Comments

@Jimmynope
Copy link

Jimmynope commented Aug 20, 2017

The playstation is one of the best platforms for playing dance dance revolution games, as it sports a wide array of American, Japanese, and European releases. Unfortunately, PCSX_rearmed appears to have difficulty emulating most of these games. I've documented it, in particular, in the following titles that would otherwise be extremely playable after input lag is sufficiently adjusted for (see below on that): DDR Konamix, DDR 3rd mix, DDR 4th mix, DDR xtra mix, Dancing Stage Fever, Dancing Stage Fusion.

The general issue is that songs and step charts will be in sync at the beginning of the song. However, as the song progresses the two seem to decouple, with the note charts seeming to lag behind the actual music. As a result, playing the game becomes nigh impossible because they need to stop stepping in time with the song, relying instead on only the visual cues that are displayed.

Strangely, this does not appear to be an issue with all the DDR games. In particular, the PSX versions of DDR 2nd remix and DDR 5th mix, which either desync to only a very small extent or do not desync at all. This might be a hint that a solution is possible.

I am very cognizant of the possibility that part of these game's unplayablity is due to lag introduced via each person's gaming setup. To minimize this, I have done the following:

  1. Set audio receiver to direct mode to bypass the interface entirely, I've also simply plugged directly into the TV
  2. Set my TV to game mode. My TV has around 33.3ms input lag, from what I'm reading. It should be quite playable.
  3. Adjusted retroarch/emulator settings to the following custom config, which I've found lower input lag a great deal for this game:
video_shader_enable = false
video_smooth = false
video_max_swapchain_images = 2
video _ threaded = false
video_vsync = false
video_drive = "dispmanx"
audio_latency = 45
  1. This doesn't have much to do with input lag, but my Pi is also overclocked with the following settings:
arm_freq=1400
gpu_freq=550
core_freq=550
v3d_freq=525
sdram_freq=550
sdram_schmoo=0x02000020
over_voltage=5
sdram_over_voltage=2
avoid_pwm_pll=1
gpu_mem=256
dtparam=sd_overclock=90
dtparam=spi=on
force_turbo=1
  1. Within the games themselves, you can change the timing options. Setting them to "slow +8", the maximum setting, helps immensely.

Ultimately, I believe this is an emulation issue as opposed to an input lag one. Input lag is relatively linear, as I understand it. If it was the issue, note carts would be inaccurate at the very beginning of the song. However, they are lock-step precise, which tells me it is something else going on.

I am running a Pi 3b with the latest release of retropie 4.2, as of 8_20_2017

@gingerbeardman
Copy link

This could be the same as #122

@tjbautista01
Copy link

tjbautista01 commented Dec 12, 2020

Pardon for bumping such an old thread but it feels like this could be of help.
TL,DR: it's not the audio, it's the video

So after years of wondering why this drifting issue occurs, I fount out the root cause only when old beatmania IIDX versions suffered drifting in PCSX2. See, old arcade beatmania IIDX versions (1st-8th) ran on PSX hardware which meant they mostly ran on 240p and framerate should be somewhere around 59.83-59.84. But PCSX2 locks the framerate at standard 59.94 which meant overtime the notes would come earlier than the background music. Take note IIDX is a keysounded game which meant any desync overtime would be very noticeable.

PCSX2 devs suggested to manually adjust framelimit in the ini to 59.83 should people choose to play the older IIDX versions as most PS2 games run at 59.94 anyway and they probably wouldn't add an autodetect framerate feature to just accommodate these handful of games running at 240p.

Why is this? Konami's engine for these games seem to depend on the framerate for the rate at which the notes scroll to their respective markers and thus, incorrect framerates will result in drifting. Even up to now the modern IIDX games are still dependent on monitor FPS for determining the scroll rate and timing of the notes.

How does this relate to DDR on PSX? 1st and 2nd Mix and their derivatives running on the same engine use CD Audio and the scroll of the arrows are tightly synchronized to the CD Audio, hence when the CD skipped the song immediately stops on the 1st version. Come 3rd Mix onward (same time as DDR USA got released) Konami used XA for the tracks and the scroll of the arrows are now dependent on the framerate like IIDX, as ingame the internal resolution switches to 240p.

Given PCSX locks the framerate at 59.94 or 60, drifting happens to the point that halfway through the song, everything's off by an 8th note. Tried this with PCSX-r using the PEOPS GPU and tried playing with the frame limiter and this issue is mostly mitigated by having the plugin autodetect framerate. Evidences are the videos of 5th Mix shown below:

Framerate locked to 59.94: https://streamable.com/9476zk
Framerate set to autodetect: https://streamable.com/5lrm7t

notaz added a commit to libretro/pcsx_rearmed that referenced this issue Apr 14, 2024
notaz added a commit that referenced this issue Apr 15, 2024
saulfabregwiivc added a commit to saulfabregwiivc/WiiStation that referenced this issue Apr 20, 2024
workaround for desync issues in Dance Dance Revolution games, and also Sypro 2.
notaz/pcsx_rearmed#91

Reference: libretro/pcsx_rearmed@2f326fa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants