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
00470f48
Verified
Commit
00470f48
authored
1 year ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
chore: support for disabling dma
parent
0f28ad42
No related branches found
No related tags found
1 merge request
!16
Support for Game Boy Color (CGB) 😎🖍️
Pipeline
#2667
failed
1 year ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontends/sdl/src/main.rs
+4
-0
4 additions, 0 deletions
frontends/sdl/src/main.rs
src/gb.rs
+9
-0
9 additions, 0 deletions
src/gb.rs
with
13 additions
and
0 deletions
frontends/sdl/src/main.rs
+
4
−
0
View file @
00470f48
...
@@ -471,6 +471,9 @@ struct Args {
...
@@ -471,6 +471,9 @@ struct Args {
#[arg(long,
default_value_t
=
false
)]
#[arg(long,
default_value_t
=
false
)]
no_apu
:
bool
,
no_apu
:
bool
,
#[arg(long,
default_value_t
=
false
)]
no_dma
:
bool
,
#[arg(long,
default_value_t
=
false
)]
#[arg(long,
default_value_t
=
false
)]
no_timer
:
bool
,
no_timer
:
bool
,
...
@@ -490,6 +493,7 @@ fn main() {
...
@@ -490,6 +493,7 @@ fn main() {
let
device
=
build_device
(
&
args
.device
);
let
device
=
build_device
(
&
args
.device
);
game_boy
.set_ppu_enabled
(
!
args
.no_ppu
);
game_boy
.set_ppu_enabled
(
!
args
.no_ppu
);
game_boy
.set_apu_enabled
(
!
args
.no_apu
);
game_boy
.set_apu_enabled
(
!
args
.no_apu
);
game_boy
.set_dma_enabled
(
!
args
.no_dma
);
game_boy
.set_timer_enabled
(
!
args
.no_timer
);
game_boy
.set_timer_enabled
(
!
args
.no_timer
);
game_boy
.attach_serial
(
device
);
game_boy
.attach_serial
(
device
);
game_boy
.load
(
true
);
game_boy
.load
(
true
);
...
...
This diff is collapsed.
Click to expand it.
src/gb.rs
+
9
−
0
View file @
00470f48
...
@@ -643,6 +643,15 @@ impl GameBoy {
...
@@ -643,6 +643,15 @@ impl GameBoy {
(
*
self
.gbc
)
.borrow_mut
()
.set_apu_enabled
(
value
);
(
*
self
.gbc
)
.borrow_mut
()
.set_apu_enabled
(
value
);
}
}
pub
fn
dma_enabled
(
&
self
)
->
bool
{
self
.dma_enabled
}
pub
fn
set_dma_enabled
(
&
mut
self
,
value
:
bool
)
{
self
.dma_enabled
=
value
;
(
*
self
.gbc
)
.borrow_mut
()
.set_dma_enabled
(
value
);
}
pub
fn
timer_enabled
(
&
self
)
->
bool
{
pub
fn
timer_enabled
(
&
self
)
->
bool
{
self
.timer_enabled
self
.timer_enabled
}
}
...
...
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