Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement optional frameskip feature. #29

Merged
merged 1 commit into from
Jan 2, 2015

Conversation

littleguy77
Copy link
Member

On mobile hardware, this makes a big difference in playability on most ROMs. E.g. on the Tegra3-based Nexus 7 (2012) and OUYA, games like DK64 and Diddy Kong Racing are not playable without this feature.

I understand that frameskip is blasphemy in some communities, so this feature is only enabled via build flag. In other words, by default, this PR makes no change whatsoever to the compiled binary.

@paulscode

@littleguy77
Copy link
Member Author

Rebased. Any thoughts on this?

@Narann
Copy link
Member

Narann commented Dec 31, 2014

Sorry for delay. The PR is clean and well documented, thanks. I've added few notes to keep the code consistent.

Tell me if I'm wrong but the makefile should also be updated:

  • Add documentation with something like: USE_FRAMESKIPPER == build with frameskipper feature"
  • Add something like:
ifeq ($(USE_FRAMESKIPPER),1)
    CFLAGS += -DUSE_FRAMESKIPPER
    SOURCE += \
        $(SRCDIR)/Glide64/FrameSkipper.cpp

This to ensure the USE_FRAMESKIPPER is well defined at compile time and files will be compiled.

@littleguy77
Copy link
Member Author

Thanks much @Narann. I will revise the pull request with the suggested cleanups/additions. I'll reopen when it's ready to pull again.

@littleguy77
Copy link
Member Author

Rebased, reformatted, added makefile documentation/flags.

@@ -424,6 +432,7 @@ targets:
@echo " NO_ASM=1 == build without inline assembly code (x86 MMX/SSE)"
@echo " USE_GLES=1 == build against GLESv2 instead of OpenGL"
@echo " NO_SSE=1 == build without SSE support"
@echo " USE_FRAMESKIPPER=1 == build with frameskipper feature"
@echo " APIDIR=path == path to find Mupen64Plus Core headers"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text alignment is ugly but I figured that whitespace cleanup is best left to a separate PR. Correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to prefer one commit per feature as most diff tools allow you to skip space change to focus on code change (I know I know, my combiner refactoring does not follow this statement...). But I don't see any real problem to do cosmetic changes in separate commits. :)

@richard42
Copy link
Member

I think the 'clock_gettime' function is unavailable in Win32. Can you provide an alternate getCurrentTicks functions so that this change will compile in Visual Studio?

@littleguy77
Copy link
Member Author

Ok, I will take a look and update the PR when I have a portable clock solution.

@littleguy77
Copy link
Member Author

Ok, just updated the PR. Frameskipper now uses SDL_GetTicks() for cross-platform portability.

richard42 added a commit that referenced this pull request Jan 2, 2015
Implement optional frameskip feature.
@richard42 richard42 merged commit a18ee5b into mupen64plus:master Jan 2, 2015
littleguy77 added a commit to littleguy77/mupen64plus-video-glide64mk2 that referenced this pull request Jan 7, 2015
mupen64plus@3e58eb7

* 3e58eb7 fix texture pack read failure on some 64-bit platforms, found by EndoplasmaticReticulum on github, due to png_uint_32 type being unfortunately defined as 'unsigned long int'
*   a18ee5b Merge pull request mupen64plus#29 from littleguy77/master
|\
| * 717b587 Implement optional frameskip feature.
|/
*   4727785 Merge branch 'master' of https://github.com/mupen64plus/mupen64plus-video-glide64mk2
|\
| *   8b0e9b5 Merge pull request mupen64plus#37 from twinaphex/master
| |\
* | \   c5998a5 Merge pull request mupen64plus#37 from twinaphex/master
|\ \ \
| |/ /
|/| /
| |/
| * 154d818 Fix broken C version of MulMatricesC
* |   c435f2a Merge pull request mupen64plus#38 from fayvel/build
|\ \
| * | 3493bd6 add extra includes and preprocessor checks for _WIN32
| * | 4d8c50a use more widely used preprocessor defines for MinGW
| * | fd37e9e use different swprintf call for _GLIBCXX_HAVE_BROKEN_VSWPRINTF
| * | a8ca725 use travis ci with clang
| * | 378c250 use newer boost for C++-11 compatibility
| * | 9593518 use Unix-compatible SDL include for SDL_thread
| * | d610bff use non-strict-ansi mode to build sources
|/ /
* |   2e66b4a Merge pull request mupen64plus#36 from krnlyng/gles
|\ \
| |/
|/|
| * a4f33ad include SDL_opengles2.h instead of SDL_opengles.h
|/
* 9a3f9ff more makefile fixes for OSX with xcode 6.1.1
* 4bbe95d use SDL threads instead of C++11 threads, which are not supported on clang
* 6a46ad1 update makefile for build with clang on XCode 6.1.1
* 339ca50 clang doesnt have the to_wstring method
* 7200662 Merge pull request mupen64plus#28 from littleguy77/master
* 3a44862 Add documentation comments for polygon offset settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants