roxas75 / rxTools

rxTools
http://www.rxtools.net/
GNU General Public License v2.0
266 stars 81 forks source link

[Enhancement] Allow games to use Full Clock Speed & Ram on N3DS #456

Closed RinMaru closed 8 years ago

RinMaru commented 8 years ago

So I heard NTR allows games to use the N3DS clock speed to make old unsupported games load faster and lag less could this be implemented into rxNand

Hartie95 commented 8 years ago

NTR doesn't do anything to ram, but you could set the clockspeed with the plugin. Aureinand on the other side allows homebrew, and possible future games to use more ram, using a new reboot patch, which doesn't block TWL and AGB firm booting.

RinMaru commented 8 years ago

Could this be added as a default or it could be set in options to turn on when rxNand launches?

Hartie95 commented 8 years ago

This value will be changed every time an application is launched, so you would need to patch the module which sets it, to always use the highest clock.

RinMaru commented 8 years ago

Im no programer but im gathering this wont happen anytime soon but it is possible and would require allot of coding. I know HANS does this and @ApacheThunder is making patches for random games.

urherenow commented 8 years ago

HANS is open source, so it's really a matter of someone feeling like doing it. Seeing as rxCFW doesn't do anything at all for TWL on N3DS, I'd say the devs are more worried about that.

RinMaru commented 8 years ago

I dont see why nintendo can't make this a feature themselves

Hartie95 commented 8 years ago

From what I know there a some games having trouble to run properly, if you change the clock speed.

RinMaru commented 8 years ago

Apparently its a HANS issue Apache Thunder has confirmed this I believe with LOZOOT he got stuttering in HANS but got no issues with his custom patches

Shadow322 commented 8 years ago

What about with NTR?

On Wed, Mar 9, 2016, 6:41 AM Ryan notifications@github.com wrote:

Apparently its a HANS issue Apache Thunder has confirmed this I believe with LOZOOT he got stuttering in HANS but got no issues with his custom patches

— Reply to this email directly or view it on GitHub https://github.com/roxas75/rxTools/issues/456#issuecomment-194279517.

sykhro commented 8 years ago

This shouldn't be implemented for a couple reasons:

RinMaru commented 8 years ago

@sykhro it could be optional It reduces lag a bit in Pokemon XY also

sykhro commented 8 years ago

Just use a modified ExHeader, that way you can set different hardware options for specific games. Keeping everything locked to the maximum doesn't seem very clean to me

RinMaru commented 8 years ago

I have no idea how to do that >"<

ApacheThunder commented 8 years ago

Yes many games could see an improvement. But this won't always be the case. Although the audio bugs with Ocarina of Time do not occur via my patches like they do with Hans. I have not tested NTR, because NTR is not compatible with the FIRM I'm currently running.

Even so, it's probably not a good idea to try and enable this globally. In perticular, older homebrew may not get along with this and it could still break things with retail games. I have not found any games (yet) that break as a result of my patches, but if one does crop up, it will end up broken the same way if this was enabled globally. (note that my Pokemon patches also enable the extra ram unlike most of my other patches)

I concur with sykhro on this. Just use a patch to do it for the specific games you want. If you run into a game that doesn't like it. Uninstall the patch. That would be easier to do then dealing with a CFW that forces it on for everything. :P

My patches are probably the best route for CFW users. NTR and hans does it just fine, but there's no gurantee they'll work with future firmware updates (as is the case with NTR. It still won't work if running latest native_firm). So my patches were the solution to that.

Having CFW doing it is probably unnessecery. If you want to create a patch yourself, it's not too difficult. (even easier if the game you will modify already had a official patch. Then you can modify that instead)

You simply change offsets 0x20C and 0x60C to 02 or 03 in the exheader (03 enables the extra ram. 02 just enables the extra CPU speed) (these two offsets should always match each other, otherwise the exheader will be determined as invalid and the patch/game won't work)

If the game did not have an official patch, it gets a little more complicated. You will need to also change offset 0x11C to 0E to change it's content type to patch. (also don't include romfs in this patch because .code won't be configured correctly to use it, so you're just wasting space Only official patches will make use of romfs correctly).

Then once the CXI is built (assuming you used 3dstool to rebuild the CXI) you modify offsets 0x10C and 1CC to be 0E. This changes the CXI to a patch. Failing to do this will cause the resulting CIA to attempt to install as an application (aka full game), which could replace your game and just break things. :P

Note that conversions of cartridge based games requires an extra change to the exheader. Since they have the "run from SD" flag disabled in the exheader. You need to change offset 0x0D to 03. This enables SD and "compressed code".

If for some odd reason the game in question doesn't use compressed code (I did come across a couple that didn't. Animal Crossing New Leaf for example). Then just compress the .code and rebuild the exefs. I don't know the bit settings for that offset offhand that would have SD enabled but compression disabled. I just compressed code to get around that issue. :P

RinMaru commented 8 years ago

Thanks for the info @ApacheThunder Ill close this then