18 Commits

Author SHA1 Message Date
Pk11
77fc7af2f2 Use macro for UTF-8 byte count
Makes it more clear why all of the buffers are being multiplied by 4

Fix UTF-8 bytesize macro

Before UTF_BUFFER_BYTESIZE(str_width - 10)] would multiply the 10, not the whole number, by UTF_MAX_BYTES_PER_RUNE

Do (rune_count + 1) * 4 in UTF-8 bytesize macro

Fix Resize/Truncate String snprintf size

Before it would break if the last character was multi-byte
2021-11-14 22:14:53 +01:00
Pk11
13eb4f8869 Proper handling of UTF-8
Note: This commit may be slightly broken, I'm just splitting up it and the next one at the end.
2021-11-14 22:13:32 +01:00
d0k3
01dd46ced3 Fix CMAC handling for TWLN and IMGNAND
Fixes #653
2020-11-25 23:48:36 +01:00
Gabriel Marcano
d010f2858b Remove trailing white space
- Removed trailing whitespace from all source code files (.c, .h. and
   .s) and the README.md
2020-08-26 23:01:58 +02:00
d0k3
521fb25075 Fix titledb entry manual detection 2020-08-02 15:40:41 +02:00
aspargas2
e744be504b perform DISA/DIFF cmac fixing automatically upon unmounting 2020-08-02 15:40:41 +02:00
d0k3
d8aeb056cb Fix CMD & NCSD handling 2020-08-02 15:40:41 +02:00
d0k3
d2c47b7977 Allow installation of game files
Should work for NCCH, NCSD, CIA, TMD from NUS/CDN and DSi eShop titles in NDS format
2020-08-02 15:40:26 +02:00
Wolfvak
929cc7fdcf better hints to reduce compiled size by a few kb
mostly just added static const to constant arrays/buffers
2020-07-23 13:46:42 -03:00
d0k3
da28c0ef40 Fix #585 2020-05-11 17:19:27 +02:00
d0k3
23a7ea7fd3 Beautified the GBA VC SD save handling code 2020-01-02 21:07:03 +01:00
TurdPooCharger
a145e8d4a9 Add handling for SD GBA VC .sav CMAC.
When identifying a selected `00000001.sav`, cmac type testing is first attempted for 3DS saves with the **DISA** format. If a 3DS save data is not detected, the search continues at expected offsets for gba vc bottom slots in increasingly larger save sizes. For the GBA VC saves, this only calculates and corrects whichever of the two slots is newer or has the higher counter. There are five additional **CMAC_AGBSAVE_** types to differentiate the different gba save sizes. If a bottom slot was found but determined to be older based on comparing the counter values, the search defaults to **CMAC_AGBSAVE_SD**.

For the save counters, there are two scenarios where the value `00` is considered bigger than `FF` depending which slot has what value. If clarification is required, I will post a diagram at [issue #494](https://github.com/d0k3/GodMode9/issues/494) explaining what is meant by `00` bigger than `FF`.

Please make corrections and improvements to the coding as you see fit in your review. I am not well versed or efficient in the C/C++ programming language.
2019-10-28 21:47:43 +01:00
d0k3
f24db1442e Fix #543 2019-10-12 17:14:16 +02:00
d0k3
87d4152d4e Add handling for SD / TWLN & DLC CMD CMACs
Fixes #340
2019-06-10 16:30:40 +02:00
d0k3
9cc31b6f56 Fix several alignment assumptions 2019-06-03 02:28:24 +02:00
d0k3
a0d2d27b06 Replace TEMP_BUFFER & MAIN_BUFFER with heap 2018-02-07 00:43:18 +01:00
d0k3
40598423da Improved progress indicator for drive CMAC fixer 2018-01-17 23:53:48 +01:00
Wolfvak
beeea37d07 Revised Makefile 2017-11-17 19:37:45 +01:00