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
10c0fa0c
Verified
Commit
10c0fa0c
authored
2 years ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
feat: small tune and added method
parent
094cfa9f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#914
passed
2 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cpu.rs
+6
-1
6 additions, 1 deletion
src/cpu.rs
src/ppu.rs
+6
-0
6 additions, 0 deletions
src/ppu.rs
with
12 additions
and
1 deletion
src/cpu.rs
+
6
−
1
View file @
10c0fa0c
...
@@ -149,7 +149,7 @@ impl Cpu {
...
@@ -149,7 +149,7 @@ impl Cpu {
let
(
instruction_fn
,
instruction_time
,
instruction_str
)
=
instruction
;
let
(
instruction_fn
,
instruction_time
,
instruction_str
)
=
instruction
;
if
*
instruction_str
==
"! UNIMP !"
{
if
*
instruction_str
==
"! UNIMP !"
||
*
instruction_str
==
"HALT"
{
println!
(
println!
(
"{}
\t
(0x{:02x})
\t
${:04x} {}"
,
"{}
\t
(0x{:02x})
\t
${:04x} {}"
,
instruction_str
,
opcode
,
pc
,
is_prefix
instruction_str
,
opcode
,
pc
,
is_prefix
...
@@ -177,6 +177,11 @@ impl Cpu {
...
@@ -177,6 +177,11 @@ impl Cpu {
self
.mmu
()
.ppu
()
self
.mmu
()
.ppu
()
}
}
#[inline(always)]
pub
fn
halted
(
&
self
)
->
bool
{
self
.halted
}
#[inline(always)]
#[inline(always)]
pub
fn
ticks
(
&
self
)
->
u32
{
pub
fn
ticks
(
&
self
)
->
u32
{
self
.ticks
self
.ticks
...
...
This diff is collapsed.
Click to expand it.
src/ppu.rs
+
6
−
0
View file @
10c0fa0c
...
@@ -453,6 +453,12 @@ impl Ppu {
...
@@ -453,6 +453,12 @@ impl Ppu {
}
}
}
}
/// Clears the current frame buffer, setting the background color
/// for all the pixels in the frame buffer.
pub
fn
clear_frame_buffer
(
&
mut
self
)
{
self
.fill_frame_buffer
([
255
,
255
,
255
]);
}
/// Prints the tile data information to the stdout, this is
/// Prints the tile data information to the stdout, this is
/// useful for debugging purposes.
/// useful for debugging purposes.
pub
fn
print_tile_stdout
(
&
self
,
tile_index
:
usize
)
{
pub
fn
print_tile_stdout
(
&
self
,
tile_index
:
usize
)
{
...
...
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