Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
boytacean
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
João Magalhães
boytacean
Commits
efbccd30
Verified
Commit
efbccd30
authored
1 year ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
chore: initial game shark structure
parent
f70e95b9
No related branches found
No related tags found
1 merge request
!33
Support for GameShark
Pipeline
#3336
failed
1 year ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lib.rs
+1
-0
1 addition, 0 deletions
src/lib.rs
src/shark.rs
+27
-0
27 additions, 0 deletions
src/shark.rs
with
28 additions
and
0 deletions
src/lib.rs
+
1
−
0
View file @
efbccd30
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
src/shark.rs
0 → 100644
+
27
−
0
View file @
efbccd30
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
,
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment