diff --git a/src/main.rs b/src/main.rs index 4d366ff..6cc5fcd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -331,3 +331,15 @@ fn cpu_ram_init(cpu: &mut CPU) { cpu.memory.set(0xFF48, 0xFF); cpu.memory.set(0xFF49, 0xFF); } + +#[allow(dead_code)] +fn swap_rom_endian(rom: &ROM) -> ROM { + rom.chunks(2) + .map(|l| { + let mut m = l.to_owned(); + m.reverse(); + m + }) + .flatten() + .collect() +}