mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-04 08:49:03 +00:00
[makerom] Fixed makerom ROMFS file limitation. +Several bug fixes.
This commit is contained in:
@@ -615,6 +615,10 @@ int CheckRomConfig(cci_settings *set)
|
||||
|
||||
void WriteCciDataToOutput(cci_settings *set)
|
||||
{
|
||||
if (set->options.verbose) {
|
||||
printf("[CCI] Writing header to file... ");
|
||||
}
|
||||
|
||||
// NCSD Header
|
||||
WriteBuffer(set->headers.ccihdr.buffer, set->headers.ccihdr.size, 0, set->out);
|
||||
// Card Info Header
|
||||
@@ -629,18 +633,34 @@ void WriteCciDataToOutput(cci_settings *set)
|
||||
memset(dummy_data, 0xff, len);
|
||||
WriteBuffer(dummy_data, len, (set->headers.ccihdr.size + set->headers.cardinfohdr.size),set->out);
|
||||
free(dummy_data);
|
||||
|
||||
if (set->options.verbose) {
|
||||
printf("Done!\n");
|
||||
}
|
||||
|
||||
// NCCH Partitions
|
||||
u8 *ncch;
|
||||
for(int i = 0; i < CCI_MAX_CONTENT; i++){
|
||||
if(set->content.active[i]){
|
||||
if (set->options.verbose) {
|
||||
printf("[CCI] Writing content %d to file... ", i);
|
||||
}
|
||||
|
||||
ncch = set->content.data + set->content.dOffset[i];
|
||||
WriteBuffer(ncch, set->content.dSize[i], set->content.cOffset[i], set->out);
|
||||
|
||||
if (set->options.verbose) {
|
||||
printf("Done!\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Cci Padding
|
||||
if(set->options.padCci){
|
||||
if (set->options.verbose) {
|
||||
printf("[CCI] Writing padding to file... ");
|
||||
}
|
||||
|
||||
fseek_64(set->out,set->romInfo.usedSize);
|
||||
|
||||
// Determining Size of Padding
|
||||
@@ -655,6 +675,10 @@ void WriteCciDataToOutput(cci_settings *set)
|
||||
fwrite(pad,set->romInfo.blockSize,1,set->out);
|
||||
|
||||
free(pad);
|
||||
|
||||
if (set->options.verbose) {
|
||||
printf("Done!");
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user