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
10c29662
Verified
Commit
10c29662
authored
1 year ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
chore: more efficient RAM data retrieval
parent
9f90a831
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#3052
failed
1 year ago
Stage: build
Stage: test
Stage: deploy
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontends/sdl/src/main.rs
+2
-2
2 additions, 2 deletions
frontends/sdl/src/main.rs
src/rom.rs
+10
-0
10 additions, 0 deletions
src/rom.rs
with
12 additions
and
2 deletions
frontends/sdl/src/main.rs
+
2
−
2
View file @
10c29662
...
...
@@ -344,8 +344,8 @@ impl Emulator {
// then we've reached the time to re-save the battery backed RAM
// into a *.sav file in the file system
if
counter
%
store_count
==
0
&&
self
.system
.rom
()
.has_battery
()
{
let
ram_data
=
self
.system
.ram_data
_eager
();
write_file
(
&
self
.ram_path
,
&
ram_data
);
let
ram_data
=
self
.system
.
rom
()
.
ram_data
();
write_file
(
&
self
.ram_path
,
ram_data
);
}
// obtains an event from the SDL sub-system to be
...
...
This diff is collapsed.
Click to expand it.
src/rom.rs
+
10
−
0
View file @
10c29662
...
...
@@ -621,6 +621,16 @@ impl Cartridge {
}
}
impl
Cartridge
{
pub
fn
rom_data
(
&
self
)
->
&
Vec
<
u8
>
{
&
self
.rom_data
}
pub
fn
ram_data
(
&
self
)
->
&
Vec
<
u8
>
{
&
self
.ram_data
}
}
impl
Default
for
Cartridge
{
fn
default
()
->
Self
{
Self
::
new
()
...
...
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