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

Enable New3DS speedup / Add .cia build #7

Closed
wants to merge 1 commit into from
Closed

Conversation

MrHuu
Copy link

@MrHuu MrHuu commented Nov 8, 2021

This PR add's a few features:

  • Enable the extra New3DS clock speeds on initialization if available
  • Build .cia format
  • .cia launches with a homebrew animation, instead of the default 3ds animation
  • Build with gamefiles included in the binaries RomFS ( both .3dsx and .cia )

When defining ROMFS in the makefile to point to the directory containing gamefiles, they will be included and looked for in the romfs.
If not defined, it builds like regular.

To be able to build a .cia, additional tools are required:
bannertool and makerom

I'll have this as a Draft, feel free to implement something similar.
This is mostly informative, but if you're interested it should be ready to merge

@MaikelChan
Copy link
Owner

MaikelChan commented Nov 8, 2021

Thanks!

I only have a 3DS, not a New 3DS, so I'm not able to test the speed up. Does the osSetSpeedupEnable(true) function checks if the game is run on a 3DS or New 3DS and ignores the speed up in 3DS?

And even if it does, do you know a good way of checking on which hardware is running? I'd like to disable vsync on 3DS but enable it on New 3DS. With the latest optimizations (along with the speed up), it should probably reach easily 60fps. But on 3DS there's still a way to go, so enabling vsync there caps the game at 30fps, which is too slow. Without vsync at least it reaches 40 something fps and it's more playable.

@MrHuu
Copy link
Author

MrHuu commented Nov 8, 2021

Thanks!

I only have a 3DS, not a New 3DS, so I'm not able to test the speed up. Does the osSetSpeedupEnable(true) function checks if the game is run on a 3DS or New 3DS and ignores the speed up in 3DS?

And even if it does, do you know a good way of checking on which hardware is running? I'd like to disable vsync on 3DS but enable it on New 3DS. With the latest optimizations (along with the speed up), it should probably reach easily 60fps. But on 3DS there's still a way to go, so enabling vsync there caps the game at 30fps, which is too slow. Without vsync at least it reaches 40 something fps and it's more playable.

The function should only enable the setting on actual new3ds hardware.
But if we want to be sure, something like this could be used to differentiate between the old or new 3ds devices:

bool isN3DS;

APT_CheckNew3DS(&isN3DS);

if(isN3DS)
    osSetSpeedupEnable(true);

@MaikelChan
Copy link
Owner

Could the makefile be modified so, in case bannertool and makerom are not found, it creates only the 3dsx as before? Right now it causes an error. I would like, if possible, to consider generating a .cia as an optional extra step.

@MaikelChan
Copy link
Owner

I finally pushed your changes and made the CIA build optional.

Thanks again for the help.

@MaikelChan MaikelChan closed this Nov 22, 2021
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.

2 participants