Write more PVD values

This commit is contained in:
2022-10-23 13:58:34 +02:00
parent 9f8b7f4ebe
commit f9f296f254
3 changed files with 27 additions and 5 deletions

View File

@@ -123,7 +123,7 @@ pub fn write_pvd(mut desc: PVDDesc, sectors: &mut Vec<IntermediateSector>, conte
let sectors_size = sectors.len();
let now_date = Date::now();
let mut raw_pvd = PrimaryVolumeDescriptor::psx_default();
let mut raw_pvd = PrimaryVolumeDescriptor::new();
raw_pvd.system_id = AString::from_str("PLAYSTATION")?;
if desc.volume_identifier.len() > 8 {
@@ -135,6 +135,7 @@ pub fn write_pvd(mut desc: PVDDesc, sectors: &mut Vec<IntermediateSector>, conte
raw_pvd.app_id = AString::from_str("PLAYSTATION")?;
raw_pvd.vol_create_time = now_date;
raw_pvd.vol_space_size.write((sectors_size - 2) as u32);
raw_pvd.cd_xa_id = ['C' as u8, 'D' as u8, '-' as u8, 'X' as u8, 'A' as u8, '0' as u8, '0' as u8, '1' as u8];
write_root_dir_record(&mut raw_pvd, content_layout.root_lba);
write_path_table(&mut raw_pvd, content_layout.path_table);