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
26950119
Verified
Commit
26950119
authored
1 year ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
fix: clippy fix
parent
1504e701
No related branches found
No related tags found
No related merge requests found
Pipeline
#2823
passed
1 year ago
Stage: build
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/apu.rs
+1
-1
1 addition, 1 deletion
src/apu.rs
src/ppu.rs
+1
-1
1 addition, 1 deletion
src/ppu.rs
src/timer.rs
+2
-2
2 additions, 2 deletions
src/timer.rs
with
4 additions
and
4 deletions
src/apu.rs
+
1
−
1
View file @
26950119
...
@@ -269,7 +269,7 @@ impl Apu {
...
@@ -269,7 +269,7 @@ impl Apu {
return
;
return
;
}
}
self
.sequencer
+=
cycles
as
u16
;
self
.sequencer
+=
cycles
;
if
self
.sequencer
>=
8192
{
if
self
.sequencer
>=
8192
{
// each of these steps runs at 512/8 Hz = 64Hz,
// each of these steps runs at 512/8 Hz = 64Hz,
// meaning a complete loop runs at 512 Hz
// meaning a complete loop runs at 512 Hz
...
...
This diff is collapsed.
Click to expand it.
src/ppu.rs
+
1
−
1
View file @
26950119
...
@@ -598,7 +598,7 @@ impl Ppu {
...
@@ -598,7 +598,7 @@ impl Ppu {
// increments the current mode clock by the provided amount
// increments the current mode clock by the provided amount
// of CPU cycles (probably coming from a previous CPU clock)
// of CPU cycles (probably coming from a previous CPU clock)
self
.mode_clock
+=
cycles
as
u16
;
self
.mode_clock
+=
cycles
;
match
self
.mode
{
match
self
.mode
{
PpuMode
::
OamRead
=>
{
PpuMode
::
OamRead
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/timer.rs
+
2
−
2
View file @
26950119
...
@@ -40,14 +40,14 @@ impl Timer {
...
@@ -40,14 +40,14 @@ impl Timer {
}
}
pub
fn
clock
(
&
mut
self
,
cycles
:
u16
)
{
pub
fn
clock
(
&
mut
self
,
cycles
:
u16
)
{
self
.div_clock
+=
cycles
as
u16
;
self
.div_clock
+=
cycles
;
while
self
.div_clock
>=
256
{
while
self
.div_clock
>=
256
{
self
.div
=
self
.div
.wrapping_add
(
1
);
self
.div
=
self
.div
.wrapping_add
(
1
);
self
.div_clock
-=
256
;
self
.div_clock
-=
256
;
}
}
if
self
.tima_enabled
{
if
self
.tima_enabled
{
self
.tima_clock
+=
cycles
as
u16
;
self
.tima_clock
+=
cycles
;
while
self
.tima_clock
>=
self
.tima_ratio
{
while
self
.tima_clock
>=
self
.tima_ratio
{
// in case TIMA value overflows must set the
// in case TIMA value overflows must set the
// interrupt and update the TIMA value to
// interrupt and update the TIMA value to
...
...
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