Initial commit: xenia-rs workspace for Xbox 360 RE
Rust reimplementation of the xenia Xbox 360 emulator targeting reverse- engineering and preservation, initially scoped to Project Sylpheed. Includes: - XEX2 loader (LZX decompression, AES decryption, PE parsing) - XISO / XGD2 disc image VFS - PPC interpreter with 200+ opcodes and VMX128 decoding - Static analyzer: functions, cross-references, labels, asm + SQLite output - HLE kernel covering the xboxkrnl/xam subset used by Sylpheed init - Debugger with in-memory and SQLite-backed execution tracing - `xenia-rs` CLI with extract/dis/exec commands that produce cumulative, superset SQLite databases and opt-in instruction/import/branch traces Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
17
crates/xenia-gpu/src/command_processor.rs
Normal file
17
crates/xenia-gpu/src/command_processor.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
/// PM4 command processor stub.
|
||||
/// Will parse the GPU command ring buffer and dispatch to render operations.
|
||||
pub struct CommandProcessor {
|
||||
pub enabled: bool,
|
||||
}
|
||||
|
||||
impl CommandProcessor {
|
||||
pub fn new() -> Self {
|
||||
Self { enabled: false }
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for CommandProcessor {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
21
crates/xenia-gpu/src/lib.rs
Normal file
21
crates/xenia-gpu/src/lib.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
pub mod command_processor;
|
||||
pub mod register_file;
|
||||
|
||||
/// Stub GPU system for initial implementation.
|
||||
pub struct GpuSystem {
|
||||
pub register_file: register_file::RegisterFile,
|
||||
}
|
||||
|
||||
impl GpuSystem {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
register_file: register_file::RegisterFile::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for GpuSystem {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
28
crates/xenia-gpu/src/register_file.rs
Normal file
28
crates/xenia-gpu/src/register_file.rs
Normal file
@@ -0,0 +1,28 @@
|
||||
/// Xenos GPU register file. 0x6000 32-bit registers.
|
||||
pub struct RegisterFile {
|
||||
pub regs: Vec<u32>,
|
||||
}
|
||||
|
||||
impl RegisterFile {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
regs: vec![0u32; 0x6000],
|
||||
}
|
||||
}
|
||||
|
||||
pub fn read(&self, index: u32) -> u32 {
|
||||
self.regs.get(index as usize).copied().unwrap_or(0)
|
||||
}
|
||||
|
||||
pub fn write(&mut self, index: u32, value: u32) {
|
||||
if let Some(r) = self.regs.get_mut(index as usize) {
|
||||
*r = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for RegisterFile {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user