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
936d768e
Verified
Commit
936d768e
authored
1 year ago
by
João Magalhães
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into joamag/audio-ch4
parents
400bf7b1
8376919f
No related branches found
No related tags found
1 merge request
!21
Initial working version of Audio CH4
Pipeline
#2401
passed
1 year ago
Stage: build
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+1
-1
1 addition, 1 deletion
CHANGELOG.md
doc/inspiration.md
+2
-0
2 additions, 0 deletions
doc/inspiration.md
src/pad.rs
+13
-14
13 additions, 14 deletions
src/pad.rs
with
16 additions
and
15 deletions
CHANGELOG.md
+
1
−
1
View file @
936d768e
...
...
@@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
*
*
Major JoyPad issue with Action/Select read in register
## [0.7.2] - 2023-03-04
...
...
This diff is collapsed.
Click to expand it.
doc/inspiration.md
+
2
−
0
View file @
936d768e
...
...
@@ -20,12 +20,14 @@
*
[
GitHub - LIJI32/SameBoy (C)
](
https://github.com/LIJI32/SameBoy
)
*
[
GitHub - binji/binjgb (C)
](
https://github.com/binji/binjgb
)
*
[
GitHub - 7thSamurai/Azayaka (C++)
](
https://github.com/7thSamurai/Azayaka
)
*
[
GitHub - feo-boy/feo-boy (Rust)
](
https://github.com/feo-boy/feo-boy
)
*
[
GitHub - Rodrigodd/gameroy (Rust)
](
https://github.com/Rodrigodd/gameroy
)
*
[
GitHub - simias/gb-rs (Rust)
](
https://github.com/simias/gb-rs
)
*
[
GitHub - RubenG123/frosty (Rust)
](
https://github.com/RubenG123/frosty
)
*
[
GitHub - calvinbaart/gameboy (TypeScript)
](
https://github.com/calvinbaart/gameboy
)
*
[
GitHub - djhworld/gomeboycolor-wasm (Go)
](
https://github.com/djhworld/gomeboycolor-wasm
)
*
[
GitHub - torch2424/wasmboy (WASM)
](
https://github.com/torch2424/wasmboy
)
## Videos
...
...
This diff is collapsed.
Click to expand it.
src/pad.rs
+
13
−
14
View file @
936d768e
...
...
@@ -5,6 +5,7 @@ use crate::warnln;
#[derive(Clone,
Copy,
PartialEq,
Eq)]
pub
enum
PadSelection
{
None
,
Action
,
Direction
,
}
...
...
@@ -45,7 +46,7 @@ impl Pad {
select
:
false
,
b
:
false
,
a
:
false
,
selection
:
PadSelection
::
Acti
on
,
selection
:
PadSelection
::
N
on
e
,
int_pad
:
false
,
}
}
...
...
@@ -70,15 +71,12 @@ impl Pad {
|
if
self
.up
{
0x00
}
else
{
0x04
}
|
if
self
.down
{
0x00
}
else
{
0x08
})
}
PadSelection
::
None
=>
0x0f
,
};
value
|
=
if
self
.selection
==
PadSelection
::
Direction
{
0x10
}
else
{
0x00
}
|
if
self
.selection
==
PadSelection
::
Action
{
0x20
}
else
{
0x00
value
|
=
match
self
.selection
{
PadSelection
::
Action
=>
0x10
,
PadSelection
::
Direction
=>
0x20
,
PadSelection
::
None
=>
0x30
,
};
value
}
...
...
@@ -92,11 +90,12 @@ impl Pad {
pub
fn
write
(
&
mut
self
,
addr
:
u16
,
value
:
u8
)
{
match
addr
&
0x00ff
{
0x0000
=>
{
self
.selection
=
if
value
&
0x10
==
0x00
{
PadSelection
::
Direction
}
else
{
PadSelection
::
Action
}
self
.selection
=
match
value
&
0x30
{
0x10
=>
PadSelection
::
Action
,
0x20
=>
PadSelection
::
Direction
,
0x30
=>
PadSelection
::
None
,
_
=>
PadSelection
::
None
,
};
}
_
=>
warnln!
(
"Writing to unknown Pad location 0x{:04x}"
,
addr
),
}
...
...
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