libretro / flycast

Flycast is a multiplatform Sega Dreamcast emulator. NOTE: No longer actively developed, use upstream repo for libretro from now on - https://github.com/flyinghead/flycast
http://reicast.com
GNU General Public License v2.0
155 stars 77 forks source link

Sonic Adventure 1 and 2 loops broken #34

Open anothername99 opened 6 years ago

anothername99 commented 6 years ago

Loops are broken, making the games unplayable.

In the first game, there's a problem with a loop in Windy Valley causing Sonic to fall down and die. sonic adventure international japan en ja fr de es -180610-011446

In the second game, there's a problem with a loop in Metal Harbor causing Sonic to run in the wrong direction. sonic adventure 2 japan en ja fr de es -180610-024500

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/59476202-sonic-adventure-1-and-2-loops-broken?utm_campaign=plugin&utm_content=tracker%2F49543223&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F49543223&utm_medium=issues&utm_source=github).
anothername99 commented 6 years ago

Sonic Adventure 1 seems fixed. Sonic Adventure 2 still broken.

hiddenasbestos commented 4 years ago

I came here to report this is, it is still an issue. The first action stage of the game is broken in Sonic Adventure 1 (European version tested) - there's a double loop-the-loop that I 3/3 times exploded out of and could not proceed.

flyinghead commented 4 years ago

@hiddenasbestos which platform?

hiddenasbestos commented 4 years ago

Sorry - this is Windows 10 x64, running RetroArch 1.8.1 (and just controller 1 connected) I'm using the 14th December build of Flycast (0.1 1180c7a) in Vulkan mode

Sonic Adventure - PAL release @ 60Hz mode

The first loop-the-loop and vertical ramp both work, but later in the stage this double loop appears and I can't get past it 100% of the time after 5 attempts: https://imgur.com/eU6aE9Y

You sort of half go around it, Sonic stops (shown in image) then if you give a controller input he shoots off in a random direction (usually to the left) like you're on a springboard and then the game kills you for being out-of-bounds.

Sonic Adventure  EUR -191216-141505

Save state: Sonic Adventure [EUR].zip

VMU file + nvmem: dc.zip

GDI files MD5 hashes: 492378e29247cfb8b225d18bbc9ff74a sonic adventure [eur].gdi b9ed5dc4b9b183501ffb7f718a0d1f69 track01.bin d1838bcbca4a24b39deddeae2a9d371a track02.raw 4df671c2091877bc3dd9b8907649ded4 track03.bin

hiddenasbestos commented 4 years ago

Here's my core options - don't think I modified anything to do with TV output but I did enable OIT and 'div matching' is turned off (default?)

reicast_allow_service_buttons = "disabled"
reicast_alpha_sorting = "per-pixel (accurate)"
reicast_analog_stick_deadzone = "15%"
reicast_boot_to_bios = "disabled"
reicast_broadcast = "Default"
reicast_cable_type = "TV (RGB)"
reicast_custom_textures = "disabled"
reicast_delay_frame_swapping = "disabled"
reicast_digital_triggers = "disabled"
reicast_div_matching = "disabled"
reicast_dump_textures = "disabled"
reicast_enable_dsp = "enabled"
reicast_enable_naomi_15khz_dipswitch = "disabled"
reicast_enable_purupuru = "enabled"
reicast_enable_rtt = "enabled"
reicast_enable_rttb = "disabled"
reicast_force_wince = "disabled"
reicast_frame_skipping = "disabled"
reicast_framerate = "fullspeed"
reicast_gdrom_fast_loading = "disabled"
reicast_hle_bios = "disabled"
reicast_internal_resolution = "640x480"
reicast_language = "Default"
reicast_lightgun1_crosshair = "disabled"
reicast_lightgun2_crosshair = "disabled"
reicast_lightgun3_crosshair = "disabled"
reicast_lightgun4_crosshair = "disabled"
reicast_mipmapping = "enabled"
reicast_oit_abuffer_size = "512MB"
reicast_per_content_vmus = "disabled"
reicast_region = "Default"
reicast_render_to_texture_upscaling = "1x"
reicast_screen_rotation = "horizontal"
reicast_show_lightgun_settings = "disabled"
reicast_show_vmu_screen_settings = "disabled"
reicast_synchronous_rendering = "disabled"
reicast_system = "auto"
reicast_texupscale = "off"
reicast_texupscale_max_filtered_texture_size = "256"
reicast_threaded_rendering = "disabled"
reicast_trigger_deadzone = "0%"
reicast_vmu1_pixel_off_color = "DEFAULT_OFF 01"
reicast_vmu1_pixel_on_color = "DEFAULT_ON 00"
reicast_vmu1_screen_display = "disabled"
reicast_vmu1_screen_opacity = "100%"
reicast_vmu1_screen_position = "Upper Left"
reicast_vmu1_screen_size_mult = "1x"
reicast_vmu2_pixel_off_color = "DEFAULT_OFF 01"
reicast_vmu2_pixel_on_color = "DEFAULT_ON 00"
reicast_vmu2_screen_display = "disabled"
reicast_vmu2_screen_opacity = "100%"
reicast_vmu2_screen_position = "Upper Left"
reicast_vmu2_screen_size_mult = "1x"
reicast_vmu3_pixel_off_color = "DEFAULT_OFF 01"
reicast_vmu3_pixel_on_color = "DEFAULT_ON 00"
reicast_vmu3_screen_display = "disabled"
reicast_vmu3_screen_opacity = "100%"
reicast_vmu3_screen_position = "Upper Left"
reicast_vmu3_screen_size_mult = "1x"
reicast_vmu4_pixel_off_color = "DEFAULT_OFF 01"
reicast_vmu4_pixel_on_color = "DEFAULT_ON 00"
reicast_vmu4_screen_display = "disabled"
reicast_vmu4_screen_opacity = "100%"
reicast_vmu4_screen_position = "Upper Left"
reicast_vmu4_screen_size_mult = "1x"
reicast_volume_modifier_enable = "enabled"
reicast_widescreen_cheats = "disabled"
reicast_widescreen_hack = "disabled"
hiddenasbestos commented 4 years ago

Exactly the same issue on my other US copy (which weirdly asked me for 50/60hz on boot) - it has different hashes though.

GDI files MD5 hashes: f43214efaec1e06a3af933cf5c49553d sonic adventure.gdi fe340f253871df58bcfa3de35f1db257 track01.bin 3aede2556812922c1070d8bf4c3e5125 track02.raw 4d0ea0267b5e472812be4e525d14b804 track03.bin

flyinghead commented 4 years ago

I can reproduce the problem on my end but I usually get 80% success on this loop. Is it comparable to what you're seeing?

Also what CPU model are you using?

hiddenasbestos commented 4 years ago

Glad you can repro it but sadly I get 0% success on this loop. I've tried going into it at different speeds, different directions when he gets stuck, etc. - never got past it.

My PC is a desktop, an Intel i7-3770 @ 3.4GHz. edit: Performance is great with Vulkan, feels like it's hitting 60Hz or there abouts.

(Also, I don't know if this is helpful but Dolphin had a similar issue for me last year. I have a feeling this game is really reliant on precise FPU behaviour.)

hiddenasbestos commented 4 years ago

OK so your CPU question got me thinking. I closed all the applications running on my PC, tried again and actually had a few successes. Probably 50/50 now if I really go as fast as I can and aim straight. Even had a couple of near misses that went in my favour - a stall at the bottom but it sent me on my way again.

Definitely some kind of problem here (I hope it was more robust at least, I must admit its been a while since I played this on a real DC). Perhaps it's just really sensitive to frame drops - certainly feels about full speed when you're playing though.

flyinghead commented 4 years ago

I get pretty much the same behavior. Sometimes I'll have 5 failures in a row but it generally hovers around 80%. It's very likely an FPU precision problem and there's a few of them already for this game. It's not about frame drops because it's transparent to the game.

The reason I asked what kind of CPU you have is because some Intel extensions are used if supported and they may have different precisions.

hiddenasbestos commented 4 years ago

Ok, thanks for the explanation. If there's anything else I can provide to fix it then let me know. However, I'm assuming this is the point where you do some programming magic with a unit test or something and there's not much more I can do.

Apparently my CPU has extensions: SSE, SSE2, SSE3, SSSE3, SSE4, SSE4.1, SSE4.2, AVX, TXT, VT-x, VT-d, F16C. I know as a 3rd gen CPU it doesn't have the more modern AVX 2, AVX 512

flyinghead commented 4 years ago

Interestingly it is the last fix for this game that's causing issues on this loop. It used to be fine before.

tails101 commented 4 years ago

same issue with sonic adventure 1 my cpu is a 4770k it seems to be worse when using the real dreamcast bios. sonic pretty much die in the speed highway demo. this glitch is not in redream just for comparison with same hardware.

tails101 commented 4 years ago

Ok so update,the bug is in x86 version of the emulator,but not in arm . I have tested the same settings on shield TV and there is no bugs in it. The best way to test if there is a loop problem is to see if Sonic get stuck or die in the demo mode. For my case it indeed die in x86 but not in arm.

celerizer commented 3 years ago

Same problem here. The best way to tell if it's bugged is if Sonic falls down at the apex of this loop in the autodemo. image

spikeyxx commented 3 years ago

I am also experiencing this bug on the most recent versions of Flycast on both PAL and NTSC copies of the game. Speed highway is impossible. Sad as this is THE flagship Dreamcast game.

tails101 commented 2 years ago

in the 27/05/22 it is mostly fixed but there is still death in the auto play demo at the start of sonic adventure 1 on pc.