Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NES Emulator testing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computer and Embedded Systems Engineering
Software Fundamentals
NES Emulator testing
Commits
e827f664
Commit
e827f664
authored
Oct 4, 2022
by
Vivian Roest
Browse files
Options
Downloads
Patches
Plain Diff
a bit more docs
parent
bf7bd4b7
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Cargo.lock
+1
-1
1 addition, 1 deletion
Cargo.lock
Cargo.toml
+1
-1
1 addition, 1 deletion
Cargo.toml
src/lib.rs
+8
-3
8 additions, 3 deletions
src/lib.rs
with
10 additions
and
5 deletions
Cargo.lock
+
1
−
1
View file @
e827f664
...
...
@@ -1031,7 +1031,7 @@ dependencies = [
[[package]]
name = "tudelft-nes-test"
version = "1.1.
3
"
version = "1.1.
4
"
dependencies = [
"bitflags",
"log",
...
...
This diff is collapsed.
Click to expand it.
Cargo.toml
+
1
−
1
View file @
e827f664
[package]
name
=
"tudelft-nes-test"
version
=
"1.1.
3
"
version
=
"1.1.
4
"
edition
=
"2021"
authors
=
[
"Victor Roest <victor@xirion.net>"
,
...
...
This diff is collapsed.
Click to expand it.
src/lib.rs
+
8
−
3
View file @
e827f664
...
...
@@ -15,8 +15,16 @@ use crate::nestest::nestest_status_code;
/// Implement this trait to run our test on our CPU via the [`run_tests`] function.
pub
trait
TestableCpu
:
Cpu
+
Sized
+
'static
{
/// This function is used by the test suite to get a handle on your CPU
/// `rom` is a rom file in INES format.
fn
get_cpu
(
rom
:
&
[
u8
])
->
Result
<
Self
,
Box
<
dyn
Error
>>
;
/// [`set_program_counter`] is used to set the program counter of the cpu to a specific position
/// this is needed by some tests.
fn
set_program_counter
(
&
mut
self
,
value
:
u16
);
/// [`memory_read`] is used to test the succesfulness of tests by seeing if the CPU has expected values
/// at certain memory locations, it simply takes an address and should return the byte of data at that memory location
fn
memory_read
(
&
self
,
address
:
u16
)
->
u8
;
}
...
...
@@ -71,9 +79,6 @@ pub fn run_tests<T: TestableCpu>(selector: TestSelector) -> Result<(), String> {
if
selector
.contains
(
TestSelector
::
NESTEST
)
{
nestest
::
<
T
>
()
?
;
}
Ok
(())
}
...
...
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