psxavenc: fix EDC not being calculated in 2336-byte sector mode

This commit is contained in:
Adrian Siekierka 2025-02-16 13:58:30 +01:00
parent bf5cd4eeb8
commit 325a73c08f
1 changed files with 3 additions and 6 deletions

View File

@ -333,13 +333,10 @@ void encode_file_str(settings_t *settings, FILE *output) {
buffer[0x00C] = ((t/75/60)%10)|(((t/75/60)/10)<<4);
buffer[0x00D] = (((t/75)%60)%10)|((((t/75)%60)/10)<<4);
buffer[0x00E] = ((t%75)%10)|(((t%75)/10)<<4);
}
// FIXME: EDC is not calculated in 2336-byte sector mode (shouldn't
// matter anyway, any CD image builder will have to recalculate it
// due to the sector's MSF changing)
if((j%interleave) < video_sectors_per_block) {
calculate_edc_data(buffer);
}
if((j%interleave) < video_sectors_per_block) {
calculate_edc_data(buffer);
}
fwrite(buffer + 2352 - sector_size, sector_size, 1, output);