Yes, as I said in an earlier post.Right.
Is n<<3 the same as n*8?
Yes, as I said in an earlier post.Right.
Is n<<3 the same as n*8?
Yes, as I said in an earlier post.
I would use a for loop for the conversation of the single bits.
YoshiInAVoid's solution is the optimal
Yes it is but you can combine it like this:
for(int i=0;i<MAXBITS;i++)
{
result |= n<<i;
}
Now if you want your program to convert 16 bits you just set MAXBITS to 16.
This will make the program more flexible
If << is better then I definitely HAVE TO use it!
you should take a look at the compiled elf. gcc will optimize in exactly that way for you. the multiplication may already be converted to shifts.
Yeah i was talking about Android Linux Kernel (ARM)... I worked on it some months ago... I rembember something about Linaro Optimizations. Are they available for 3DS?well, not just linux kernel stuff. your makefile is set to -O2, so i'd say it would almost certainly have changed it to shifts.
e: some other optimization tricks to keep in mind for arm:
http://stackoverflow.com/questions/10800372/c-tips-for-code-optimization-on-arm-devices
Then create it.I was thinking. How difficult would it be to create a homebrew file/save manager. I think it would be great if we can sync our saves across different 3ds consoles without the need of using a PC to manually copy the saves.
I was thinking. How difficult would it be to create a homebrew file/save manager. I think it would be great if we can sync our saves across different 3ds consoles without the need of using a PC to manually copy the saves.
Thats easier said than done, by far.Then create it.
Then create it.
Pretty much would need to code up an FTP server/manager and have it identify and transfer files between two connected units. As no one has released a PoC for FTP on the 3DS, the bulk of the work would need to be done on that before this would be feasible. I'm not even sure that CTRUlib supports networking just yet, so we'd have to hold on for that first.Thats easier said than done, by far.
Well I wasn't even thinking about that, but just getting the xorpad for a save is a pain.. assuming you just want sharing between gateway devices, that's easier.. that reminds me, I decompiled cyber gadget software and was gonna implement save sharing.. it's not high on my priorities atm thoPretty much would need to code up an FTP server/manager and have it identify and transfer files between two connected units. As no one has released a PoC for FTP on the 3DS, the bulk of the work would need to be done on that before this would be feasible. I'm not even sure that CTRUlib supports networking just yet, so we'd have to hold on for that first.
undefined reference to '__aeabi_idivmod'
undefined reference to '__aeabi_idiv'
Just do a 1.0/3?Anyone know how to do division and modulus on arm9?
I am getting a linker error with:
I poked around in the math header files in devkitarm but couldn't find any mention of either.Code:undefined reference to '__aeabi_idivmod' undefined reference to '__aeabi_idiv'
I am aware that arm does not have a divison instruction, but there still should be a simple way with c right?
unsigned long long __aeabi_uidiv (unsigned long long numerator, unsigned long long denominator)
{
unsigned long long result;
result = 0;
while ((numerator-denominator)>denominator)
{
result++;
numerator -=denominator;
}
return result;
}