Closed 173210 closed 9 years ago
The MPU settings are set because we don't know how they are when the payload is loaded (I'm not so sure it's the case though. I do remember I researched it a bit when I put it there). Those settings are mostly the default settings as described here (except for the latest two): http://3dbrew.org/wiki/Memory_layout#NATIVE_FIRM.2FSAFE_MODE_FIRM_ARM9_kernel If the settings are always the same (because, as I stated above, I'm not sure), and do not get changed under any circumstances, then I can remove them and just set the last two (though it's always the safest to just reset them all). Otherwise, if you need one changed, just change it in your own code.
@mid-kid As far as I know, the MPU setting is always the same. As you say, I changed the setting in my code for now. https://github.com/173210/rxTools/commit/af3c061d729b6be43c59363838335110039fba71#diff-734cf5121327b7884d20046d262ed26aR22
I've been thinking: If CakeHax doesn't change it, it will depend on the firmware version if you can write in the 0x08100000-0x08200000 region (<8.0.0-X has the same settings for that region as CakeHax sets). You will have to set it anyway, just to be sure. To make sure there's no compatibility problems with this over different firmware versions, I don't think this should change. Please correct me if I'm wrong.
@mid-kid Old firmwares can work only on old 3DS, which doesn't have the region physically, so I don't have to change the setting.
That depends on if the code will be run by both types of consoles. I don't know if your code is meant to run only on n3ds. CakeHax is meant to run on both, anyway, and I think keeping consistent settings is the better option here. I see no reason to change it, and if you need some other settings for some special case, you change them yourself (like you did). Closing for the reasons stated above (that doesn't mean I can't change my mind, but I just can't find an argument to do it another way).
@mid-kid rxTools loads rebooting code to different addresses. Actually it's "inconsistent". However, the rebooting code should be loaded in the region specific for new 3DS because it overwrites most of the common region. The change is based on the inconsistency of 3DS hardware/software implementation. In other words, the code is necessary to make the behavior consistent when it accesses existing ARM9 memory.
rebootRam = 0x080FF604;
ENTRY(rebootRam)
rebootRam = 0x0817F604;
ENTRY(rebootRam)
Here is the link for the code.
I don't know which is wrong, comment or code. Probably the code is wrong because bit 5 (0x20) has no effect.Both are correct. I was wrong. I should have a rest. https://github.com/mid-kid/CakeHax/commit/d07d6ddadd8a7cc051fe890bd3d1430e5dbe66fb#diff-4b52b1f3e4eec8cb9278f2e8d842871fR11In my case, I want it to leave as it is because it disables to write after 0x08100000. If the code is not necessary, I suggest to remove those code.