melonDS icon indicating copy to clipboard operation
melonDS copied to clipboard

Extra savestate info

Open SuuperW opened this issue 4 years ago • 11 comments
trafficstars

Three commits for graphical fixes and one lid-related fix. Including the 3D buffer is necessary to properly render the 1st frame after loading a savestate.

SuuperW avatar Jan 30 '21 01:01 SuuperW

From the failed build check:

Preparing to unpack .../35-msodbcsql17_17.7.1.1-1_amd64.deb ... ERROR: The EULA was not accepted. Installation aborted. dpkg: error processing archive /tmp/apt-dpkg-install-dkNrQl/35-msodbcsql17_17.7.1.1-1_amd64.deb (--unpack): new msodbcsql17 package pre-installation script subprocess returned error exit status 1

Is someone messing with stuff here? Failure to accept a EULA seems a strange way to fail.

SuuperW avatar Jan 30 '21 02:01 SuuperW

From the failed build check:

Preparing to unpack .../35-msodbcsql17_17.7.1.1-1_amd64.deb ... ERROR: The EULA was not accepted. Installation aborted. dpkg: error processing archive /tmp/apt-dpkg-install-dkNrQl/35-msodbcsql17_17.7.1.1-1_amd64.deb (--unpack): new msodbcsql17 package pre-installation script subprocess returned error exit status 1

Is someone messing with stuff here? Failure to accept a EULA seems a strange way to fail.

the CI can be a bit flaky sometimes

RSDuck avatar Jan 30 '21 06:01 RSDuck

Including the 3D buffer is necessary to properly render the 1st frame after loading a savestate.

The core doesn't have to do it. Bizhawk optionally makes a screenshot when you save a state and puts it in when you load it. Unless the plan is to enable rerecording directly in melonds frontend, but even then it's better to make the framebuffer in savestates optional.

Or did you mean the first actually emulated frame after state load?

vadosnaprimer avatar Jan 30 '21 09:01 vadosnaprimer

@vadosnaprimer Yes, I meant the first actually emulated frame. The 3D buffer is applied to the final output on the frame after it is rendered (or, the frame on which rendering began in the case of threaded rendering).

SuuperW avatar Jan 30 '21 12:01 SuuperW

I force-pushed and it now re-renders the 3D buffer instead of saving/loading it directly. It only works with the software renderer. I have very little experience with OpenGL and have no interest in making that work.

I also made it blank the frame buffer when loading a state with the lid closed, but I couldn't figure out how to make this work on the frontend when rendering with OpenGL; it'll still show the frame from before loading the savestate.

SuuperW avatar Feb 01 '21 00:02 SuuperW

I had noticed that when loading a savestate there was a frame of messed up graphics. So, this is going to fix that?

poudink avatar Feb 01 '21 15:02 poudink

From the failed build check:

Preparing to unpack .../35-msodbcsql17_17.7.1.1-1_amd64.deb ... ERROR: The EULA was not accepted. Installation aborted. dpkg: error processing archive /tmp/apt-dpkg-install-dkNrQl/35-msodbcsql17_17.7.1.1-1_amd64.deb (--unpack): new msodbcsql17 package pre-installation script subprocess returned error exit status 1

Is someone messing with stuff here? Failure to accept a EULA seems a strange way to fail.

I've fixed the Ubuntu AArch64 CI issue (https://github.com/Arisotura/melonDS/commit/b5e601bb88858b124b0cc41a4ee7eb6896dee8d3).

RayyanAnsari avatar Feb 02 '21 13:02 RayyanAnsari

@poudink Yes, this PR fixes all the savestate related graphical bugs that I'm aware of, but some of those bugs are only fixed with the software renderer. I do not currently plan on fixing everything with OpenGL; I'll leave that to someone with a better understanding of how OpenGL is used here. There are two known issues when using OpenGL:

  1. It does not render the 3D buffer after loading a savestate. (as of now, it only works when the savestate was both created and loaded with the software renderer) [GPU3D.cpp:659]
  2. The display buffer is not updated after loading a savestate in which the lid is closed. [NDS.cpp:773]

SuuperW avatar Feb 02 '21 22:02 SuuperW

so my plan is the following: I would like to merge #990 first and then add appropriate functions for restarting the frame/giving a black frame to the new rasteriser interface (which would be implemented for the OGL renderer as well) which would simplify this PR.

RSDuck avatar Feb 06 '21 17:02 RSDuck

That works for me. I'll probably make a new branch from master after that merge is complete, and cherry-pick or re-work these commits as necessary to work with the new code.

SuuperW avatar Feb 06 '21 23:02 SuuperW

I force-pushed this branch after rebasing on master. There wasn't really much changed, so the commits are effectively identical to what they were before, just some code has moved from a .cpp file to a .h file. The OpenGL renderer still does not implement the RestartFrame function.

SuuperW avatar Feb 20 '21 15:02 SuuperW