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
ad7a2ae9
Verified
Commit
ad7a2ae9
authored
2 years ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
fix: small fixes
parent
4ca8872c
No related branches found
No related tags found
No related merge requests found
Pipeline
#894
passed
2 years ago
Stage: build
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/sdl/src/main.rs
+6
-0
6 additions, 0 deletions
examples/sdl/src/main.rs
src/cpu.rs
+7
-0
7 additions, 0 deletions
src/cpu.rs
src/ppu.rs
+2
-1
2 additions, 1 deletion
src/ppu.rs
with
15 additions
and
1 deletion
examples/sdl/src/main.rs
+
6
−
0
View file @
ad7a2ae9
...
@@ -100,7 +100,13 @@ fn main() {
...
@@ -100,7 +100,13 @@ fn main() {
//game_boy.load_rom_file("../../res/roms/paradius/cpu/09-op r,r.gb"); // NO FINISH
//game_boy.load_rom_file("../../res/roms/paradius/cpu/09-op r,r.gb"); // NO FINISH
//game_boy.load_rom_file("../../res/roms/paradius/cpu/11-op a,(hl).gb"); // NO FINISH
//game_boy.load_rom_file("../../res/roms/paradius/cpu/11-op a,(hl).gb"); // NO FINISH
let
mut
counter
=
0u32
;
'main
:
loop
{
'main
:
loop
{
// increments the counter that will keep track
// on the number of visual ticks since beginning
counter
=
counter
.wrapping_add
(
1
);
while
let
Some
(
event
)
=
graphics
.event_pump
.poll_event
()
{
while
let
Some
(
event
)
=
graphics
.event_pump
.poll_event
()
{
match
event
{
match
event
{
Event
::
Quit
{
..
}
=>
break
'main
,
Event
::
Quit
{
..
}
=>
break
'main
,
...
...
This diff is collapsed.
Click to expand it.
src/cpu.rs
+
7
−
0
View file @
ad7a2ae9
...
@@ -101,6 +101,13 @@ impl Cpu {
...
@@ -101,6 +101,13 @@ impl Cpu {
self
.push_word
(
pc
);
self
.push_word
(
pc
);
self
.pc
=
0x40
;
self
.pc
=
0x40
;
self
.mmu
.ppu
()
.ack_vblank
();
self
.mmu
.ppu
()
.ack_vblank
();
// in case the CPU is currently halted waiting
// for an interrupt, releases it
if
self
.halted
{
self
.halted
=
false
;
}
return
16
;
return
16
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/ppu.rs
+
2
−
1
View file @
ad7a2ae9
...
@@ -77,7 +77,8 @@ pub struct Ppu {
...
@@ -77,7 +77,8 @@ pub struct Ppu {
/// Defines the size in pixels of the object (false=8x8, true=8x16).
/// Defines the size in pixels of the object (false=8x8, true=8x16).
obj_size
:
bool
,
obj_size
:
bool
,
/// Controls the map that is going to be drawn to screen, the
/// Controls the map that is going to be drawn to screen, the
/// offset in VRAM will be adjusted according to this.
/// offset in VRAM will be adjusted according to this
/// (false=0x9800, true=0x9c000).
bg_map
:
bool
,
bg_map
:
bool
,
/// If the background tile set is active meaning that the
/// If the background tile set is active meaning that the
/// negative based indexes are going to be used.
/// negative based indexes are going to be used.
...
...
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