23 lines
425 B
Rust
23 lines
425 B
Rust
use crate::virtual_machine::Program;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub struct AppHeader {
|
|
pub app_id: String,
|
|
pub magic: u32,
|
|
pub version: u16,
|
|
pub title: String,
|
|
pub entrypoint: u32,
|
|
}
|
|
|
|
#[derive(Clone, Debug)]
|
|
pub struct Cartridge {
|
|
pub header: AppHeader,
|
|
pub program: Program,
|
|
}
|
|
|
|
impl Cartridge {
|
|
pub fn new(header: AppHeader, program: Program) -> Self {
|
|
Self { header, program }
|
|
}
|
|
}
|