NTR_Launcher/BootLoader/source/modcrypt/u128_math.h
ApacheThunder de31f9cb2b 1.3 Refactor
* Added DSOnei kernel to included nds files for Stage2 menu.
* Added N-Card rom dump to included nds files for Stage2 menu.
* Added CycloDS, and DSTWo bootloader dumps to included nds files for
Stage2 menu.
* DSTwo now boots correctly from cart launcher.
* R4 SDHC Gold and other similar DEMON time bomb DSTTi clones now boot
correctly from cart launcher.
* Added back option for enabling/disabling TWL ram.
* Added fixes to allow DS only carts to run with TWL ram enabled.
* Initial modcrypt code added for TWL carts. Currently works in
emulation however TWL carts will fail to boot on hardware (when twl
mode, ram, etc is enabled).
* If TWL mode and ram is enabled, cart loader will now load the DSi
extended binaries into ram. Currently however they will only boot in
emulation. Have not resolved why it's not working on hardware yet.
* Stage2 menu now allowed to load dsi extended binaries of SRLs if TWL
mode and TWL ram is enabled. Booting rom dumps as a method of booting
into TWL carts is confirmed working. At least for System Flaw it does.
:D
* Despite the improvents Acekard 2i still appears to require using the
stage2 menu to boot into.
* Fixes that allowed Demon timebomb carts to boot from cart
launcher/autoboot may allow other non working carts to work. Further
testing needed.
2024-11-27 21:50:32 -06:00

38 lines
818 B
C

// u128_math
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
// left rotate by (shift % 128) bits
void u128_lrot(uint8_t *num, uint32_t shift) ;
// right rotate by (shift % 128) bits
void u128_rrot(uint8_t *num, uint32_t shift) ;
// bitwise xor strored to a
void u128_xor(uint8_t *a, const uint8_t *b) ;
// bitwise or strored to a
void u128_or(uint8_t *a, const uint8_t *b) ;
// bitwise and strored to a
void u128_and(uint8_t *a, const uint8_t *b) ;
// add b to a and store in a
void u128_add(uint8_t *a, const uint8_t *b) ;
// add 32 bit value b to a and store in a
void u128_add32(uint8_t *a, const uint32_t b) ;
// substract b from a and store in a
void u128_sub(uint8_t *a, const uint8_t *b) ;
// swap byte order
void u128_swap(uint8_t *out, const uint8_t *in) ;
#ifdef __cplusplus
}
#endif