melonDS
melonDS copied to clipboard
Extra savestate info
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.
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.
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
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 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).
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.
I had noticed that when loading a savestate there was a frame of messed up graphics. So, this is going to fix that?
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).
@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:
- 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]
- The display buffer is not updated after loading a savestate in which the lid is closed. [NDS.cpp:773]
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.
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.
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.