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
2bba9622
Verified
Commit
2bba9622
authored
1 year ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
feat: added glob panning audio store
parent
64b9f06a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#2455
passed
1 year ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/apu.rs
+14
-4
14 additions, 4 deletions
src/apu.rs
with
14 additions
and
4 deletions
src/apu.rs
+
14
−
4
View file @
2bba9622
...
@@ -76,6 +76,8 @@ pub struct Apu {
...
@@ -76,6 +76,8 @@ pub struct Apu {
ch4_length_stop
:
bool
,
ch4_length_stop
:
bool
,
ch4_enabled
:
bool
,
ch4_enabled
:
bool
,
glob_panning
:
u8
,
right_enabled
:
bool
,
right_enabled
:
bool
,
left_enabled
:
bool
,
left_enabled
:
bool
,
...
@@ -149,6 +151,8 @@ impl Apu {
...
@@ -149,6 +151,8 @@ impl Apu {
ch4_length_stop
:
false
,
ch4_length_stop
:
false
,
ch4_enabled
:
false
,
ch4_enabled
:
false
,
glob_panning
:
0x0
,
left_enabled
:
true
,
left_enabled
:
true
,
right_enabled
:
true
,
right_enabled
:
true
,
...
@@ -232,6 +236,8 @@ impl Apu {
...
@@ -232,6 +236,8 @@ impl Apu {
self
.ch4_length_stop
=
false
;
self
.ch4_length_stop
=
false
;
self
.ch4_enabled
=
false
;
self
.ch4_enabled
=
false
;
self
.glob_panning
=
0x0
;
self
.left_enabled
=
true
;
self
.left_enabled
=
true
;
self
.right_enabled
=
true
;
self
.right_enabled
=
true
;
...
@@ -302,9 +308,13 @@ impl Apu {
...
@@ -302,9 +308,13 @@ impl Apu {
}
}
pub
fn
read
(
&
mut
self
,
addr
:
u16
)
->
u8
{
pub
fn
read
(
&
mut
self
,
addr
:
u16
)
->
u8
{
{
match
addr
{
warnln!
(
"Reading from unknown APU location 0x{:04x}"
,
addr
);
// 0xFF25 — NR51: Sound panning
0xff
0xff25
=>
self
.glob_panning
,
_
=>
{
warnln!
(
"Reading from unknown APU location 0x{:04x}"
,
addr
);
0xff
}
}
}
}
}
...
@@ -424,7 +434,7 @@ impl Apu {
...
@@ -424,7 +434,7 @@ impl Apu {
}
}
// 0xFF25 — NR51: Sound panning
// 0xFF25 — NR51: Sound panning
0xff25
=>
{
0xff25
=>
{
//@TODO: Implement sound panning
self
.glob_panning
=
value
;
}
}
// 0xFF26 — NR52: Sound on/off
// 0xFF26 — NR52: Sound on/off
0xff26
=>
{
0xff26
=>
{
...
...
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