Giter Site home page Giter Site logo

Comments (13)

dinkc64 avatar dinkc64 commented on May 26, 2024

Help wanted: someone to figure out what caused this? and a possible solution?
I can think of one thing - previously we were using completely wrong # of lines per frame, so some games would glitch. Cyclewise, I think we're pretty much right-on, but on the other hand, anything could be possible.

best regards,

  • dink

from fbneo.

barbudreadmon avatar barbudreadmon commented on May 26, 2024

I can think of one thing - previously we were using completely wrong # of lines per frame, so some games would glitch. Cyclewise, I think we're pretty much right-on, but on the other hand, anything could be possible.

Good guess, the input lag regression is the result of this commit, more specifically the part in cps_run.cpp where CpsDraw was moved (i tried moving it back and the input lag went down to 1 frame again).

from fbneo.

dinkc64 avatar dinkc64 commented on May 26, 2024

Captain Commando and Chiki / Mega Twins get raster glitches when drawing at the end of frame as opposed to at vblank (like it does and should). I'm pretty sure it's being emulated faithfully, basically drawing at the end of frame means we're drawing some of the next frame's data (which is why it glitches) - because after vblank that's when it starts preparing the next scene/frame. The glitches are basically caused by the mixing of current frame + incomplete next frame's data being displayed.

from fbneo.

dinkc64 avatar dinkc64 commented on May 26, 2024

But, there is always a solution... :)
I know for a fact chiki and captcomm have issues, we can have those games draw at vblank and have all the rest draw at end of frame. Problem solved, if we find other games that have raster glitches they can also be kludged.

from fbneo.

barbudreadmon avatar barbudreadmon commented on May 26, 2024

If drawing at vblank is how it should be, then i'm totally fine with it. I thought it was only a regression but if it's actually an improvement accuracy-wise, maybe we should stay that way ? 2 frames of input lag is not that bad (especially on the libretro port where you can artificially cut it anyway).

from fbneo.

dinkc64 avatar dinkc64 commented on May 26, 2024

Code in. Just need some more help. First, notice what a raster glitch is by grabbing the latest code and run captcomm after editing d_cps1.cpp:
static INT32 Cps1RasterInit()
{
Cps1DrawAtVblank = 1; <- change this to 0 for this test.

return DrvInit();

}

watch as the titlescreen uses a raster effect to expand the Captain Commando logo. Do you see those glitches as it expands the logo? A glitch can also involve flickering something and disappearing it before showing it again & before or after fadeouts. Now change the init back to Cps1DrawAtVblank = 1;

The next step involves looking for similar raster glitches on other CPS1 game other than Captain Commando and Mega Twins / Chiki. They usually present themselves in the titlescreen/attract mode or cutscenes after starting a game.

These are just guidelines to look for raster bugs, if you don't want to do this that is ok :)

from fbneo.

dinkc64 avatar dinkc64 commented on May 26, 2024

Responce to your message above, this is how I originally wanted to do it but [that evil guy] cut my code (you can see in the history), so when I realized that he is not in charge any more, we'll do it my way :)

from fbneo.

barbudreadmon avatar barbudreadmon commented on May 26, 2024

we'll do it my way :)

That's fine too :), i'll close then !

from fbneo.

barbudreadmon avatar barbudreadmon commented on May 26, 2024

Re-opening already, i found an issue with logo zoom/rotation on sf2 and clones, however i couldn't fix sf2rules & sf2b3 by using Cps1RasterInit in their custom init functions. I sent a PR for the others (however i didn't test all the clones, only those with custom init functions).

NB : it seems TwelveMhzInit is fixing logo for sf2rules & sf2b3, but i didn't include this in my PR because i wasn't sure about side effects.

On a sidenote (most likely unrelated to the current issue), i found this glitch on sf2b's guile stage :
sf2b-190623-172931

from fbneo.

dinkc64 avatar dinkc64 commented on May 26, 2024

Can you please re-check sf2 titlescreen before and after the vblank kludge? If so, can you post a side-by-side picture for the bad frames?

I compared SF2's titlescreen logo pseudo-"roto-zoom" both ways, and each one has equally crappy effect.
Drawing at vblank or end of frame makes no difference at all, at least to my eyes.

This effect was intended by capcom, because cps1 doesn't support roz they did a pseudo-roz effect and it looks horrible - but probably they meant for it to happen so fast and never thought people would single-step the frames :)

from fbneo.

dinkc64 avatar dinkc64 commented on May 26, 2024

sf2b doesn't support all of the scroll registers that a normal cps1 board has, which is the reason for the broken plane tail-fin. See the Notes: section on standalone ;)

from fbneo.

dinkc64 avatar dinkc64 commented on May 26, 2024

p.s. I just single-stepped old vs. new sf2 titlescreen side-by-side and frames are identical.

from fbneo.

barbudreadmon avatar barbudreadmon commented on May 26, 2024

Nvm, it seems i messed up somewhere while testing yesterday (i can't figure out what i did though), i can't reproduce it anymore.
Somehow instead of rotating then expanding, the tiles of the logo were merging into a single square then expanding, it was really weird.
Sorry about the false alarm... Closing again then.

from fbneo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.