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
ee38b016
Verified
Commit
ee38b016
authored
2 years ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
feat: new warnings
parent
0159cc74
No related branches found
No related tags found
No related merge requests found
Pipeline
#982
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
+3
-3
3 additions, 3 deletions
examples/sdl/src/main.rs
src/pad.rs
+7
-2
7 additions, 2 deletions
src/pad.rs
src/ppu.rs
+7
-2
7 additions, 2 deletions
src/ppu.rs
with
17 additions
and
7 deletions
examples/sdl/src/main.rs
+
3
−
3
View file @
ee38b016
...
@@ -159,14 +159,14 @@ fn main() {
...
@@ -159,14 +159,14 @@ fn main() {
//let rom = game_boy.load_rom_file("../../res/roms.prop/dr_mario.gb");
//let rom = game_boy.load_rom_file("../../res/roms.prop/dr_mario.gb");
//let rom = game_boy.load_rom_file("../../res/roms.prop/alleyway.gb");
//let rom = game_boy.load_rom_file("../../res/roms.prop/alleyway.gb");
//let rom = game_boy.load_rom_file("../../res/roms.prop/super_mario.gb");
//let rom = game_boy.load_rom_file("../../res/roms.prop/super_mario.gb");
let
rom
=
game_boy
.load_rom_file
(
"../../res/roms.prop/super_mario_2.gb"
);
//
let rom = game_boy.load_rom_file("../../res/roms.prop/super_mario_2.gb");
//let rom = game_boy.load_rom_file("../../res/roms/firstwhite.gb");
//let rom = game_boy.load_rom_file("../../res/roms/firstwhite.gb");
//let rom = game_boy.load_rom_file("../../res/roms/opus5.gb");
//let rom = game_boy.load_rom_file("../../res/roms/opus5.gb");
//let rom = game_boy.load_rom_file("../../res/roms/paradius/cpu/cpu_instrs.gb"); //
CR
AS
H
ED
//let rom = game_boy.load_rom_file("../../res/roms/paradius/cpu/cpu_instrs.gb"); //
P
AS
S
ED
//let rom = game_boy.load_rom_file("../../res/roms/paradius/interrupt_time/interrupt_time.gb"); // FAILED
//let rom = game_boy.load_rom_file("../../res/roms/paradius/interrupt_time/interrupt_time.gb"); // FAILED
//
let rom = game_boy.load_rom_file("../../res/roms/paradius/instr_timing/instr_timing.gb"); // FAILED
let
rom
=
game_boy
.load_rom_file
(
"../../res/roms/paradius/instr_timing/instr_timing.gb"
);
// FAILED
//let rom = game_boy.load_rom_file("../../res/roms/paradius/mem_timing/mem_timing.gb"); // NO FINISH
//let rom = game_boy.load_rom_file("../../res/roms/paradius/mem_timing/mem_timing.gb"); // NO FINISH
//let rom = game_boy.load_rom_file("../../res/roms/paradius/cpu/01-special.gb"); // PASSED
//let rom = game_boy.load_rom_file("../../res/roms/paradius/cpu/01-special.gb"); // PASSED
//let rom = game_boy.load_rom_file("../../res/roms/paradius/cpu/02-interrupts.gb"); // PASSED
//let rom = game_boy.load_rom_file("../../res/roms/paradius/cpu/02-interrupts.gb"); // PASSED
...
...
This diff is collapsed.
Click to expand it.
src/pad.rs
+
7
−
2
View file @
ee38b016
#[cfg(feature
=
"wasm"
)]
#[cfg(feature
=
"wasm"
)]
use
wasm_bindgen
::
prelude
::
*
;
use
wasm_bindgen
::
prelude
::
*
;
use
crate
::
warnln
;
#[derive(Clone,
Copy,
PartialEq)]
#[derive(Clone,
Copy,
PartialEq)]
pub
enum
PadSelection
{
pub
enum
PadSelection
{
Action
,
Action
,
...
@@ -77,7 +79,10 @@ impl Pad {
...
@@ -77,7 +79,10 @@ impl Pad {
};
};
value
value
}
}
addr
=>
panic!
(
"Reading from unknown Pad location 0x{:04x}"
,
addr
),
_
=>
{
warnln!
(
"Reading from unknown Pad location 0x{:04x}"
,
addr
);
0xff
}
}
}
}
}
...
@@ -90,7 +95,7 @@ impl Pad {
...
@@ -90,7 +95,7 @@ impl Pad {
PadSelection
::
Action
PadSelection
::
Action
}
}
}
}
addr
=>
panic
!
(
"Writing to unknown Pad location 0x{:04x}"
,
addr
),
_
=>
warnln
!
(
"Writing to unknown Pad location 0x{:04x}"
,
addr
),
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/ppu.rs
+
7
−
2
View file @
ee38b016
...
@@ -7,6 +7,8 @@ use std::{
...
@@ -7,6 +7,8 @@ use std::{
#[cfg(feature
=
"wasm"
)]
#[cfg(feature
=
"wasm"
)]
use
wasm_bindgen
::
prelude
::
*
;
use
wasm_bindgen
::
prelude
::
*
;
use
crate
::
warnln
;
pub
const
VRAM_SIZE
:
usize
=
8192
;
pub
const
VRAM_SIZE
:
usize
=
8192
;
pub
const
HRAM_SIZE
:
usize
=
128
;
pub
const
HRAM_SIZE
:
usize
=
128
;
pub
const
OAM_SIZE
:
usize
=
260
;
pub
const
OAM_SIZE
:
usize
=
260
;
...
@@ -419,7 +421,10 @@ impl Ppu {
...
@@ -419,7 +421,10 @@ impl Ppu {
0x0045
=>
self
.lyc
,
0x0045
=>
self
.lyc
,
0x004a
=>
self
.wy
,
0x004a
=>
self
.wy
,
0x004b
=>
self
.wx
,
0x004b
=>
self
.wx
,
addr
=>
panic!
(
"Reading from unknown PPU location 0x{:04x}"
,
addr
),
_
=>
{
warnln!
(
"Reading from unknown PPU location 0x{:04x}"
,
addr
);
0xff
}
}
}
}
}
...
@@ -487,7 +492,7 @@ impl Ppu {
...
@@ -487,7 +492,7 @@ impl Ppu {
0x004a
=>
self
.wy
=
value
,
0x004a
=>
self
.wy
=
value
,
0x004b
=>
self
.wx
=
value
,
0x004b
=>
self
.wx
=
value
,
0x007f
=>
(),
0x007f
=>
(),
addr
=>
panic
!
(
"Writing in unknown PPU location 0x{:04x}"
,
addr
),
_
=>
warnln
!
(
"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