game-compatibility icon indicating copy to clipboard operation
game-compatibility copied to clipboard

534507D6 - Sonic the Hedgehog

Open Ichigo14 opened this issue 8 years ago • 133 comments

Marketplace

Issues:

Ingame with major glitches.

sonic3 sonic sonic2

Labels:

state-gameplay, gpu-corrupt-drawing

Ichigo14 avatar Dec 09 '15 05:12 Ichigo14

Tested on EmuCR-Xenia-20151215.

title screen it's ok now

xenia333333

Ichigo14 avatar Dec 16 '15 07:12 Ichigo14

It seems a new bug has popped up on certain hardware configurations for this game in later builds.

I noticed that certain actions would kill me instantly while showing me a black screen (or a frozen screen) until respawn. And watching videos of people playing the game on the same builds I was testing this on, it seems the bug is not affecting them. The system I was testing this on had a GTX 980, Intel 5930k, DDR4 2133 RAM, and Windows 10.

The things that trigger this are:

And as you can see there are also issues with the game camera (which is bad on real hardware but not that bad)

cmexp avatar May 03 '16 16:05 cmexp

@cmexp I'm getting the same behavior on the latest build, plus physics are all over the place. How did you get around the half-screen + swapped color palette? ex- ex

theoldsport avatar May 04 '16 02:05 theoldsport

@cmexp Oh... well that's cheating! I guess my screenshot is a more accurate representation of how the game currently runs (unmodded)

theoldsport avatar May 04 '16 04:05 theoldsport

To be fair, it's only the graphics that are fixed. The physics are still all over the place in the modded game.

cmexp avatar May 04 '16 04:05 cmexp

@SilverSzymonPL This half-playable (Sound OK, but some broken graphics and game mechanics) LvL Crysis City (Vulkan) https://www.youtube.com/watch?v=CjHccEYhz5g LvL Ocean Wave (OpenGL) https://www.youtube.com/watch?v=h_Jr5GbuSI8

Parovozik avatar Dec 04 '16 13:12 Parovozik

image image image image image image image image image

It work everything right texture all of NPC, the camera have a little buggy on wave ocean like before. The rings, sonic spikes on head it has been many error!!

Updated: Main meny background have black on half, no gun effect when robotnik shoot. Chaos Emerald is just a shape, not like the old build. Tree, flower is buggy, water is not animation. Background is just a black!!! Tails is normal now not buggy anymore!!

Use light chip on wave ocean, jump on 3 springs, jump to the whale head it will be a black screen and lose a life!!

This is the test on OpenGL in build (https://github.com/benvanik/xenia/commit/5b8b339c388a0ff4c8be113d46bc30b5dc3bd5e4)

On Vulkan test is just a black screen only hear the sound, button working!!!

HorrorTroll avatar Jan 18 '17 10:01 HorrorTroll

AMD GPU here. The retail release doesn't crash while using Vulkan, but has depth issues when using the cache.arc hack linked above.

untitled

Using the game vanilla just gives me a black screen. HUD elements work however.

Irixion avatar Mar 27 '17 19:03 Irixion

I have a Nvidia GPU, not AMD.

jthecodebuilder avatar Apr 09 '17 01:04 jthecodebuilder

Try updating your build, it shouldn't crash now. For me, it was just a temporary regression for one or two builds. Really hoping that AMD users will see some more parity with their nVidia counterparts. GL runs like molasses compared to the Vulkan...though without game modification the game doesn't draw any 3D assets.

Irixion avatar Apr 10 '17 18:04 Irixion

https://gist.githubusercontent.com/Irixion/30a55942162bccdb5046357d3e4e70cb/raw/e29c7bbab465fad78d65e0bf5bfb8289a53be698/xenia.log

Here's the log. Specifically this bit:

w> 00000004 GPU: Write to unknown register (045E = 00000004) w> 00000004 GPU: Write to unknown register (045E = 00000004) w> 00000004 GPU: Write to unknown register (045E = 00000004) w> 00000004 GPU: Write to unknown register (045E = 00000004)

Lots of unknown register warnings.

Irixion avatar Apr 20 '17 03:04 Irixion

On latest master, it crashes at beginning loading on Vulkan. Using AMD GPU and CPU

Windows 10 (64 bit) AMD FX(tm)-6300 Six-Core Processor AMD Radeon (TM) R7 360 Series

Log file: xenia.txt

ActualMandM avatar Apr 22 '17 04:04 ActualMandM

Tested on (https://github.com/benvanik/xenia/commit/cecc66622f278ca057e19afe86768af6dfe640ba)

Issues:

Vulkan. Color bug, invisible hair on Sonic OpenGL. Invisible hair on Sonic Core. Black screen bug if uses triple jump-pad (not freeze, not crash, game restarting from last checkpoit), black screen bug on dolphin (there auto change character but go on restart from last checkpoint). Sometimes blackscreen bug on circle-jump. Sometimes no physics (collision?) and Sonic falls through (example qte on jumping), but if locked 30fps then this works more good (but slow-mo ingame speed) Audio - OK. Performance is good.

Logs:

Sonic_Vulkan_60FPS.txt Sonic_Vulkan_30FPS.txt Sonic_OpenGL.txt

Video:

YouTube_Sonic_Vulkan

Screenshots:

Vulkan: desktop 04 23 2017 - 01 48 39 02 mp4_snapshot_01 26_ 2017 04 23_02 22 13 Vulkan: desktop 04 23 2017 - 01 48 39 02 mp4_snapshot_00 42_ 2017 04 23_02 23 36 OpenGL: desktop 04 23 2017 - 02 00 41 04 mp4_snapshot_01 18_ 2017 04 23_02 24 09

Labels:

gpu-corrupt-drawing gpu-missing-drawing cpu-timing (?) state-gameplay

Parovozik avatar Apr 22 '17 23:04 Parovozik

@slashiee Your issue is caused by AMD's drivers. Upgrading to the latest drivers causes it to crash on my system as well. Removing them and letting Windows install them allows it to function properly.

@Parovozik The black screen "bug" is a crash handler in the game. It just kills you when it doesn't know what to do and reloads from the last checkpoint. As far as collision, the game's logic runs at 60 fps. If capped to 30, some unusual things may happen.

Irixion avatar Apr 23 '17 00:04 Irixion

https://www.youtube.com/watch?v=eTrbLqsxncc - Vulkan

https://www.youtube.com/watch?v=fOsP-yF-mXI - OpenGL

On the latest build, using the modified cache.arc file.

Irixion avatar May 10 '17 23:05 Irixion

Tested on (https://github.com/benvanik/xenia/commit/84758a3a3faa03aed86611380ead1660f2e4657b) Now colors more correct, but still bugs as triple-jump-pad and etc

Video:

YouTube_Sonic2006_Vulkan

Screenshot:

xenia sonic2006 vk60 mp4_snapshot_00 53_ 2017 05 14_03 03 57

Parovozik avatar May 14 '17 00:05 Parovozik

Can the labels be modified to include: gpu-missing-drawing cpu-timing

Currently I get a black screen with just HUD elements on Vulkan, but I'll try the newest build once I get home. AMD 😥

Irixion avatar May 14 '17 01:05 Irixion

https://www.youtube.com/watch?v=R344TIDtbss

screenie

Without the cache modification this is all I get.

Irixion avatar May 14 '17 04:05 Irixion

Workaround

I've just fixed the jump pad and camera error by rolling back this part in xenia-cpu:

  1. Commented out OPCODE_SPLAT in constant_propagation_pass.cc This is the main reason that cause various games's camera and vertices go wrong (PR#514)

You can find the exactly changes on my forked branch (Sorry about the space indentation lol)

Video

https://www.youtube.com/watch?v=AaJQHpAxCxQ Everything seems back to normal, the game is pretty much playable now 💯

btw I don't know if this fixes/breaks the other games, also I have literally zero acknowledge of 360 emulation so I'd called this a workaround. That'd be cool if some developers can look into these codes. Should I raise a PR or Issue?

Edited: Deleted my change to ppc_emit_fpu since I can't reproduce nan's error, maybe it's just me missing something.

AllanCat avatar Jul 10 '17 06:07 AllanCat

I still have no clue on how to get this game working on Vulkan. Even on my new computer, it crashes on boot. OpenGL works fine, though.

GeForce GTX 1060 6GB Intel Core i5-7600K @ 3.80GHz 16GB RAM DD4-2133MHz

image

ActualMandM avatar Jul 12 '17 00:07 ActualMandM

I have the same card. Though, make sure your drivers are up to date and that Vulkan is installed. Also, sometimes Xenia crashes for no reason when the log file exists. Try deleting that. Also try extracting the ISO's contents, and using the cache.arc replacement that's linked in this thread.

Irixion avatar Jul 12 '17 00:07 Irixion

@AllanCat Cache file works, thanks!

image

ActualMandM avatar Jul 12 '17 00:07 ActualMandM

There's only a couple of things that are still off with the game, though it's very close to perfect emulation. Hoping the Vulkan thread gets unlocked so we can discuss things. You're my hero @AllanCat

Irixion avatar Jul 12 '17 00:07 Irixion

@Irixion While it's nice a temporary workaround was found, reverting changes blindly is not going to be accepted as a PR. This however, can be taken note of and be investigated when a contributor has time to.

gibbed avatar Jul 12 '17 01:07 gibbed

Got some time messing around with cache file. You can get it from here

  1. Fixed map graphic issue as the original cache hack didn't render it properly. (core/render_radermap.lub)
  2. OpenGL Speed up(by set GenerateCSMLevels and GenerateCSMObjects to 1), I'd say about ~20% faster though it still slows down at various situations(Too Much Water). At least it runs almost 60fps in crysis city and wave ocean.

Also by reducing audio buffer (kMaximumQueuedFrames in audio_sysrem.h) the latency feels better.

Video: https://www.youtube.com/watch?v=pOpKpM-N7xY At this point I think I've already gone too far and done what I can with this game. Cheer up :D

AllanCat avatar Jul 12 '17 14:07 AllanCat

@owner Feels like there's regression with that in there though. The audio buffer (kMaximumQueuedFrames in audio_sysrem.h) though needs to be adjusted for Vulkan--the audio is slightly out of sync with the video.

@AllanCat Some levels set CSM levels for terrain and objects on their own. Xenia doesn't seem to be generating any shadow maps though, so levels look flat on both backends. However, how did you manage to edit the lub file? Did you use chunkspy?

There's some miscolouration on effects, things like flames for example. There's also some effects (such as bloom) that are misaligned (to the right) of where they should be. Not sure if the gpu corrupt tag is the right one for that.

Irixion avatar Jul 12 '17 19:07 Irixion

@Irixion There's exactly one unluac fork that supports for lua5.0, it still has problem about for loop. Here I'm just bypassing the error: decompile\Registers.java

  public Target getTarget(int register, int line) {
    if(!isLocal(register, line)) {
      //throw new IllegalStateException("No declaration exists in register " + register + " at line " + line);
      //
      decls[register][line] = new Declaration("_TMP_", 0, 0);
    }
    return new VariableTarget(decls[register][line]);
  }

This is a bit off topic, I think we can discuss on other place(discord or so). Thanks!

AllanCat avatar Jul 13 '17 00:07 AllanCat

Did some more researches about what works and what not, here's my progress so far:

Video:

https://www.youtube.com/watch?v=6GcLpbTM2QA

Reports:

Xenia issues:

Found three spots which broke a lot of games, still need to fix them instead of just reverting the commits. (mentioned here and here)

Common issues:

  1. Not supporting MSAA caused game crash(vulkan) or glitched(gl). Fixed by removing all MSAA parameters in cache file. Note that's probably the reason makes other games not working too.

  2. Building&Character's shadow isn't cut correctly so that the whole ground became dark gray. Fixed by removing all shadow effects, this speed up openGL a lot.

Vulkan issues:

  1. Color is darker than console/gl. It's been noted maybe something wrong with channel swapping, hoping that can be fixed soon.

  2. Some reflecting effect has wrong color map(like sea in town, Sonic's shoes and Amy's ring gloves) This is probably caused by Vulkan not supporting k_2_10_10_10_FLOAT color format(GL can mapped this to GL_RGB10_A2), maybe we need to convert k_2_10_10_10_FLOAT to other formats.

OpenGL issues:

  1. Missing textures for all people in game, even Alise and Eggman. I really don't know why. orz.

Screenshots:

Some screenshots about the issues mentioned above: https://imgur.com/a/K35Xb

AllanCat avatar Jul 18 '17 05:07 AllanCat

will it be better to put those common issues to the issue list instead of burring here? even the vulkan issues are common issues since vulkan is now the only one being supported instead of GL.

jackchentwkh avatar Jul 18 '17 13:07 jackchentwkh

@jackchentwkh That would be great, but the Vulkan thread is locked. I think the only reason he's comparing the two is because GL supports some things that Vulkan doesn't, and it would be helpful to look and see how GL does it, to implement similar functionality to Vulkan.

@AllanCat I've sent you a message on YouTube. Did you get it?

As far as the textures for the townspeople, I think that it's got something to do with the CPU instructions that were reverted as it worked for me in earlier builds.

Irixion avatar Jul 18 '17 15:07 Irixion