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
f3527607
Verified
Commit
f3527607
authored
2 years ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
feat: new ignore on error I/O writing
parent
eb1016cd
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
examples/sdl/src/main.rs
+1
-1
1 addition, 1 deletion
examples/sdl/src/main.rs
src/mmu.rs
+2
-2
2 additions, 2 deletions
src/mmu.rs
src/ppu.rs
+2
-1
2 additions, 1 deletion
src/ppu.rs
with
6 additions
and
4 deletions
.gitignore
+
1
−
0
View file @
f3527607
...
...
@@ -5,4 +5,5 @@ Cargo.lock
/.idea
/target
/res/roms
/examples/*/target
This diff is collapsed.
Click to expand it.
examples/sdl/src/main.rs
+
1
−
1
View file @
f3527607
...
...
@@ -75,7 +75,7 @@ fn main() {
let
mut
game_boy
=
GameBoy
::
new
();
game_boy
.load_boot_default
();
game_boy
.load_rom
(
"
C:/Users/joamag/Desktop
/tetris.gb"
);
game_boy
.load_rom
(
"
../../res/roms
/tetris.gb"
);
let
mut
counter
=
0
;
...
...
This diff is collapsed.
Click to expand it.
src/mmu.rs
+
2
−
2
View file @
f3527607
...
...
@@ -64,7 +64,7 @@ impl Mmu {
0x000
|
0x100
|
0x200
|
0x300
|
0x400
|
0x500
|
0x600
|
0x700
|
0x800
|
0x900
|
0xa00
|
0xb00
|
0xc00
|
0xd00
=>
self
.ram
[(
addr
&
0x1fff
)
as
usize
],
0xe00
=>
{
println!
(
"R
EADING FROM
PPU OAM - NOT IMPLEMENTED"
);
println!
(
"R
eading from
PPU OAM - NOT IMPLEMENTED"
);
0x00
}
0xf00
=>
{
...
...
@@ -126,7 +126,7 @@ impl Mmu {
self
.ram
[(
addr
&
0x1fff
)
as
usize
]
=
value
;
}
0xe00
=>
{
println!
(
"W
RITING TO
PPU OAM"
);
println!
(
"W
riting to
PPU OAM"
);
}
0xf00
=>
{
if
addr
>=
0xff80
{
...
...
This diff is collapsed.
Click to expand it.
src/ppu.rs
+
2
−
1
View file @
f3527607
...
...
@@ -241,7 +241,8 @@ impl Ppu {
color_index
=>
panic!
(
"Invalid palette color index {:04x}"
,
color_index
),
}
}
}
},
0x007f
=>
(),
addr
=>
panic!
(
"Writing in unknown PPU 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