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
8d20f48e
Verified
Commit
8d20f48e
authored
2 years ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
feat: added new comments
parent
9416e604
No related branches found
No related tags found
No related merge requests found
Pipeline
#885
passed
2 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/sdl/src/main.rs
+6
-10
6 additions, 10 deletions
examples/sdl/src/main.rs
with
6 additions
and
10 deletions
examples/sdl/src/main.rs
+
6
−
10
View file @
8d20f48e
...
...
@@ -78,6 +78,8 @@ fn main() {
)
.unwrap
();
// creates a new Game Boy instance and loads both the boot ROM
// and the initial game ROM to "start the engine"
let
mut
game_boy
=
GameBoy
::
new
();
game_boy
.load_boot_sgb
();
...
...
@@ -85,11 +87,11 @@ fn main() {
//game_boy.load_rom_file("../../res/roms.prop/alleyway.gb");
//game_boy.load_rom_file("../../res/roms/firstwhite.gb");
//
game_boy.load_rom_file("../../res/roms/opus5.gb");
game_boy
.load_rom_file
(
"../../res/roms/opus5.gb"
);
//game_boy.load_rom_file("../../res/roms/special.gb");
//game_boy.load_rom_file("../../res/roms/paradius/cpu/01-special.gb"); // PASSED
game_boy
.load_rom_file
(
"../../res/roms/paradius/cpu/02-interrupts.gb"
);
// NO FINISH
//
game_boy.load_rom_file("../../res/roms/paradius/cpu/02-interrupts.gb"); // NO FINISH
//game_boy.load_rom_file("../../res/roms/paradius/cpu/03-op sp,hl.gb"); // NO FINISH
//game_boy.load_rom_file("../../res/roms/paradius/cpu/04-op r,imm.gb"); // PASSED
//game_boy.load_rom_file("../../res/roms/paradius/cpu/05-op rp.gb"); // PASSED
...
...
@@ -99,13 +101,7 @@ 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/11-op a,(hl).gb"); // NO FINISH
let
mut
counter
=
0
;
'main
:
loop
{
if
counter
>=
700000000
{
break
;
}
while
let
Some
(
event
)
=
graphics
.event_pump
.poll_event
()
{
match
event
{
Event
::
Quit
{
..
}
=>
break
'main
,
...
...
@@ -127,8 +123,8 @@ fn main() {
counter_ticks
+=
game_boy
.clock
()
as
u32
;
}
counter
+=
counter_ticks
;
// obtains the frame buffer of the Game Boy PPU and uses it
// to update the stream texture, copying it then to the canvas
let
frame_buffer
=
game_boy
.frame_buffer
()
.as_ref
();
texture
.update
(
None
,
frame_buffer
,
DISPLAY_WIDTH
as
usize
*
3
)
...
...
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