uint32_t need_units = (module->contentSize - sysmodule->contentSize);
fprintf(stderr, "Module: Would grow %d units but NYI\n", need_units);
continue;
- // FIXME - Adjust sysmodule section and FIRM NCCH. This is not correct.
-/* fprintf(stderr, "Module: Grow %d units\n", module->contentSize - sysmodule->contentSize);
- // Location to shuffle to.
- uint8_t* move_to = ((uint8_t*)sysmodule + (module->contentSize + need_units) * 0x200);
- uint8_t* move_from = ((uint8_t*)sysmodule + module->contentSize * 0x200);
- uint32_t copy_size = 0x10000; // FIXME - Add a safe way to properly calculate the half of NCCH we need to copy. This is okay for now.
+ // TODO - so in a nutshell, the reason Luma works is because it relocates
+ // the sysmodule section to its final location while fixing the size.
+ // Once stuff is at the right place, it no longer cares about its' size.
- memmove(move_to, move_from, copy_size); */
- // TODO - This is hackish and possibly incorrect. It needs testing.
+ // Cakes performs an in-place resize and leaves the copy for later; essentially,
+ // this means I need to scale EVERYTHING after the increase, and adjust NCCH sections accordingly.
+
+ // It would be hella easier to just patch at the final location in memory;
+ // and this was actually mentioned on Luma's issues.
}
// Move the remaining modules closer