Skip to content
Snippets Groups Projects
Verified Commit efbccd30 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

chore: initial game shark structure

parent f70e95b9
No related branches found
No related tags found
1 merge request!33Support for GameShark
Pipeline #3336 failed
...@@ -16,6 +16,7 @@ pub mod pad; ...@@ -16,6 +16,7 @@ pub mod pad;
pub mod ppu; pub mod ppu;
pub mod rom; pub mod rom;
pub mod serial; pub mod serial;
pub mod shark;
pub mod state; pub mod state;
pub mod test; pub mod test;
pub mod timer; pub mod timer;
......
use std::collections::HashMap;
#[derive(Clone)]
#[cfg_attr(feature = "wasm", wasm_bindgen)]
pub struct GameShark {
/// Hash map that contains the complete set of Game Shark
/// codes that have been registered for the current ROM.
/// These codes are going to apply a series of patches to
/// the RAM effectively allowing the user to cheat.
codes: HashMap<u16, GameSharkCode>,
}
#[derive(Clone)]
pub struct GameSharkCode {
/// The Game Genie code that is going to be applied to the ROM.
code: String,
/// The RAM bank that the cheat code is going to be applied to,
/// allowing advanced MBCs to be patched.
ram_bank: u16,
/// The new data that is going to be written to the address.
new_data: u8,
/// Address of the data that is going to be patched.
addr: u16,
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment