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
ac7e98cd
Verified
Commit
ac7e98cd
authored
1 year ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
feat: new secure feature
parent
3fe2d11f
No related branches found
No related tags found
1 merge request
!16
Support for Game Boy Color (CGB) 😎🖍️
Pipeline
#2572
failed
1 year ago
Stage: build
Stage: test
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Cargo.toml
+1
-0
1 addition, 0 deletions
Cargo.toml
frontends/sdl/Cargo.toml
+1
-0
1 addition, 0 deletions
frontends/sdl/Cargo.toml
frontends/sdl/README.md
+6
-5
6 additions, 5 deletions
frontends/sdl/README.md
src/cpu.rs
+6
-1
6 additions, 1 deletion
src/cpu.rs
with
14 additions
and
6 deletions
Cargo.toml
+
1
−
0
View file @
ac7e98cd
...
@@ -17,6 +17,7 @@ crate-type = ["cdylib", "rlib"]
...
@@ -17,6 +17,7 @@ crate-type = ["cdylib", "rlib"]
[features]
[features]
wasm
=
[
"wasm-bindgen"
]
wasm
=
[
"wasm-bindgen"
]
debug
=
[]
debug
=
[]
secure
=
[]
cpulog
=
[]
cpulog
=
[]
gen-mock
=
[]
gen-mock
=
[]
...
...
This diff is collapsed.
Click to expand it.
frontends/sdl/Cargo.toml
+
1
−
0
View file @
ac7e98cd
...
@@ -10,6 +10,7 @@ edition = "2018"
...
@@ -10,6 +10,7 @@ edition = "2018"
[features]
[features]
slow
=
[]
slow
=
[]
debug
=
[
"boytacean/debug"
]
debug
=
[
"boytacean/debug"
]
secure
=
[
"boytacean/secure"
]
cpulog
=
[
"boytacean/cpulog"
]
cpulog
=
[
"boytacean/cpulog"
]
[dependencies.boytacean]
[dependencies.boytacean]
...
...
This diff is collapsed.
Click to expand it.
frontends/sdl/README.md
+
6
−
5
View file @
ac7e98cd
...
@@ -32,8 +32,9 @@ cargo run --features debug
...
@@ -32,8 +32,9 @@ cargo run --features debug
## Features
## Features
| Provider | Description |
| Provider | Description |
| -------- | --------------------------------------------------------------------------- |
| -------- | ------------------------------------------------------------------------------------------------- |
|
`debug`
| Activates the base
`debug`
feature from Boytacean. |
|
`debug`
| Activates the base
`debug`
feature from Boytacean. |
|
`slow`
| Runs the emulator at a very slow page 60x slower to allow visual debugging. |
|
`secure`
| Additional safety instructions are executed to make sure the machine does no run "out of tracks". |
|
`cpulog`
| Prints a log of the CPU instruction executed. |
|
`slow`
| Runs the emulator at a very slow page 60x slower to allow visual debugging. |
|
`cpulog`
| Prints a log of the CPU instruction executed. |
This diff is collapsed.
Click to expand it.
src/cpu.rs
+
6
−
1
View file @
ac7e98cd
...
@@ -280,7 +280,12 @@ impl Cpu {
...
@@ -280,7 +280,12 @@ impl Cpu {
}
}
#[cfg(feature
=
"cpulog"
)]
#[cfg(feature
=
"cpulog"
)]
println!
(
"[0x{:04x}] {}"
,
self
.pc
-
1
,
inst_str
);
println!
(
"[0x{:04x}] {}
\t
({} cycles)"
,
self
.pc
-
1
,
inst_str
,
inst_time
);
#[cfg(feature
=
"secure"
)]
if
self
.mmu
.boot_active
()
&&
self
.pc
-
1
>
0x08ff
{
panic!
(
"Invalid boot address: {:04x}"
,
self
.pc
-
1
);
}
// calls the current instruction and increments the number of
// calls the current instruction and increments the number of
// cycles executed by the instruction time of the instruction
// cycles executed by the instruction time of the instruction
...
...
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