mirror of https://github.com/encounter/nod-rs.git
Export more constants & minor cleanup
This commit is contained in:
parent
d4bca2caa8
commit
e0d735dd39
|
@ -170,6 +170,7 @@ pub(crate) fn read_part_meta(
|
|||
reader
|
||||
.read_exact(&mut raw_apploader[size_of::<ApploaderHeader>()..])
|
||||
.context("Reading apploader")?;
|
||||
let raw_apploader = raw_apploader.into_boxed_slice();
|
||||
|
||||
// fst.bin
|
||||
reader
|
||||
|
@ -207,13 +208,14 @@ pub(crate) fn read_part_meta(
|
|||
.unwrap_or(size_of::<DolHeader>() as u32);
|
||||
raw_dol.resize(dol_size as usize, 0);
|
||||
reader.read_exact(&mut raw_dol[size_of::<DolHeader>()..]).context("Reading DOL")?;
|
||||
let raw_dol = raw_dol.into_boxed_slice();
|
||||
|
||||
Ok(Box::new(PartitionMeta {
|
||||
raw_boot,
|
||||
raw_bi2,
|
||||
raw_apploader: raw_apploader.into_boxed_slice(),
|
||||
raw_apploader,
|
||||
raw_fst,
|
||||
raw_dol: raw_dol.into_boxed_slice(),
|
||||
raw_dol,
|
||||
raw_ticket: None,
|
||||
raw_tmd: None,
|
||||
raw_cert_chain: None,
|
||||
|
|
|
@ -26,7 +26,7 @@ pub use fst::{Fst, Node, NodeKind};
|
|||
pub use streams::{FileStream, OwnedFileStream, WindowedStream};
|
||||
pub use wii::{SignedHeader, Ticket, TicketLimit, TmdHeader, REGION_SIZE};
|
||||
|
||||
/// Size in bytes of a disc sector.
|
||||
/// Size in bytes of a disc sector. (32 KiB)
|
||||
pub const SECTOR_SIZE: usize = 0x8000;
|
||||
|
||||
/// Magic bytes for Wii discs. Located at offset 0x18.
|
||||
|
@ -361,10 +361,10 @@ pub struct PartitionMeta {
|
|||
pub raw_bi2: Box<[u8; BI2_SIZE]>,
|
||||
/// Apploader (apploader.bin)
|
||||
pub raw_apploader: Box<[u8]>,
|
||||
/// File system table (fst.bin)
|
||||
pub raw_fst: Box<[u8]>,
|
||||
/// Main binary (main.dol)
|
||||
pub raw_dol: Box<[u8]>,
|
||||
/// File system table (fst.bin)
|
||||
pub raw_fst: Box<[u8]>,
|
||||
/// Ticket (ticket.bin, Wii only)
|
||||
pub raw_ticket: Option<Box<[u8]>>,
|
||||
/// TMD (tmd.bin, Wii only)
|
||||
|
|
|
@ -66,8 +66,8 @@ use std::{
|
|||
pub use disc::{
|
||||
ApploaderHeader, DiscHeader, DolHeader, FileStream, Fst, Node, NodeKind, OwnedFileStream,
|
||||
PartitionBase, PartitionHeader, PartitionKind, PartitionMeta, SignedHeader, Ticket,
|
||||
TicketLimit, TmdHeader, WindowedStream, BI2_SIZE, BOOT_SIZE, GCN_MAGIC, REGION_SIZE,
|
||||
SECTOR_SIZE, WII_MAGIC,
|
||||
TicketLimit, TmdHeader, WindowedStream, BI2_SIZE, BOOT_SIZE, DL_DVD_SIZE, GCN_MAGIC,
|
||||
MINI_DVD_SIZE, REGION_SIZE, SECTOR_SIZE, SL_DVD_SIZE, WII_MAGIC,
|
||||
};
|
||||
pub use io::{
|
||||
block::{DiscStream, PartitionInfo},
|
||||
|
|
Loading…
Reference in New Issue